Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 3.4:
  Add missing dots at the end of exception messages
  • Loading branch information
fabpot committed Mar 15, 2020
2 parents de41204 + e74d9ad commit 305196e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Store/MemcachedStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function isSupported()
public function __construct(\Memcached $memcached, int $initialTtl = 300)
{
if (!static::isSupported()) {
throw new InvalidArgumentException('Memcached extension is required');
throw new InvalidArgumentException('Memcached extension is required.');
}

if ($initialTtl < 1) {
Expand Down
4 changes: 2 additions & 2 deletions Store/RedisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RedisStore implements StoreInterface
public function __construct($redisClient, float $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) {
Expand Down Expand Up @@ -153,7 +153,7 @@ private function evaluate(string $script, string $resource, array $args)
return $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)));
}

private function getUniqueToken(Key $key): string
Expand Down
2 changes: 1 addition & 1 deletion Store/SemaphoreStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function isSupported(): bool
public function __construct()
{
if (!static::isSupported()) {
throw new InvalidArgumentException('Semaphore extension (sysvsem) is required');
throw new InvalidArgumentException('Semaphore extension (sysvsem) is required.');
}
}

Expand Down

0 comments on commit 305196e

Please sign in to comment.