Skip to content

Commit

Permalink
Fix quotes in exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 16, 2020
1 parent e74d9ad commit 0dc0d7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Store/RedisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class RedisStore implements StoreInterface
public function __construct($redisClient, $initialTtl = 300.0)
{
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\ClientInterface && !$redisClient instanceof RedisProxy) {
throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, %s given.', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
throw new InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
}

if ($initialTtl <= 0) {
throw new InvalidArgumentException(sprintf('%s() expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
}

$this->redis = $redisClient;
Expand Down Expand Up @@ -143,7 +143,7 @@ private function evaluate($script, $resource, array $args)
return \call_user_func_array([$this->redis, 'eval'], array_merge([$script, 1, $resource], $args));
}

throw new InvalidArgumentException(sprintf('%s() expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, %s given.', __METHOD__, \is_object($this->redis) ? \get_class($this->redis) : \gettype($this->redis)));
throw new InvalidArgumentException(sprintf('%s() expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, \is_object($this->redis) ? \get_class($this->redis) : \gettype($this->redis)));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Store/StoreFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public static function createStore($connection)
return new MemcachedStore($connection);
}

throw new InvalidArgumentException(sprintf('Unsupported Connection: %s.', \get_class($connection)));
throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".', \get_class($connection)));
}
}

0 comments on commit 0dc0d7a

Please sign in to comment.