Skip to content

Commit 0dc0d7a

Browse files
committed
Fix quotes in exception messages
1 parent e74d9ad commit 0dc0d7a

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
@@ -37,11 +37,11 @@ class RedisStore implements StoreInterface
3737
public function __construct($redisClient, $initialTtl = 300.0)
3838
{
3939
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\ClientInterface && !$redisClient instanceof RedisProxy) {
40-
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)));
40+
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)));
4141
}
4242

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

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

146-
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)));
146+
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)));
147147
}
148148

149149
/**

Store/StoreFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public static function createStore($connection)
3535
return new MemcachedStore($connection);
3636
}
3737

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

0 commit comments

Comments
 (0)