Skip to content

Commit ae5d89e

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Fix quotes in exception messages
2 parents cee3a33 + 0dc0d7a commit ae5d89e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Store/RedisStore.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class RedisStore implements StoreInterface
3939
public function __construct($redisClient, float $initialTtl = 300.0)
4040
{
4141
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\ClientInterface && !$redisClient instanceof RedisProxy) {
42-
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)));
42+
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)));
4343
}
4444

4545
if ($initialTtl <= 0) {
46-
throw new InvalidTtlException(sprintf('%s() expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
46+
throw new InvalidTtlException(sprintf('"%s()" expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
4747
}
4848

4949
$this->redis = $redisClient;
@@ -153,7 +153,7 @@ private function evaluate(string $script, string $resource, array $args)
153153
return $this->redis->eval(...array_merge([$script, 1, $resource], $args));
154154
}
155155

156-
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)));
156+
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)));
157157
}
158158

159159
private function getUniqueToken(Key $key): string

Store/StoreFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ public static function createStore($connection)
9595
return new ZookeeperStore(ZookeeperStore::createConnection($connection));
9696
}
9797

98-
throw new InvalidArgumentException(sprintf('Unsupported Connection: %s.', $connection));
98+
throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection));
9999
}
100100
}

0 commit comments

Comments
 (0)