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 2d4d118 commit f4dc52b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Session/Storage/Handler/RedisSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct($redis, array $options = [])
!$redis instanceof RedisProxy &&
!$redis instanceof RedisClusterProxy
) {
throw new \InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, %s given.', __METHOD__, \is_object($redis) ? \get_class($redis) : \gettype($redis)));
throw new \InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, \is_object($redis) ? \get_class($redis) : \gettype($redis)));
}

if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) {
Expand Down
6 changes: 3 additions & 3 deletions Session/Storage/Handler/SessionHandlerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SessionHandlerFactory
public static function createHandler($connection): AbstractSessionHandler
{
if (!\is_string($connection) && !\is_object($connection)) {
throw new \TypeError(sprintf('Argument 1 passed to %s() must be a string or a connection object, %s given.', __METHOD__, \gettype($connection)));
throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.', __METHOD__, \gettype($connection)));
}

switch (true) {
Expand All @@ -46,7 +46,7 @@ public static function createHandler($connection): AbstractSessionHandler
return new PdoSessionHandler($connection);

case !\is_string($connection):
throw new \InvalidArgumentException(sprintf('Unsupported Connection: %s.', \get_class($connection)));
throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', \get_class($connection)));
case 0 === strpos($connection, 'file://'):
return new StrictSessionHandler(new NativeFileSessionHandler(substr($connection, 7)));

Expand Down Expand Up @@ -80,6 +80,6 @@ public static function createHandler($connection): AbstractSessionHandler
return new PdoSessionHandler($connection);
}

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

0 comments on commit f4dc52b

Please sign in to comment.