Skip to content

Commit f4dc52b

Browse files
committed
Fix quotes in exception messages
1 parent 2d4d118 commit f4dc52b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Session/Storage/Handler/RedisSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct($redis, array $options = [])
5454
!$redis instanceof RedisProxy &&
5555
!$redis instanceof RedisClusterProxy
5656
) {
57-
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)));
57+
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)));
5858
}
5959

6060
if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) {

Session/Storage/Handler/SessionHandlerFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SessionHandlerFactory
2727
public static function createHandler($connection): AbstractSessionHandler
2828
{
2929
if (!\is_string($connection) && !\is_object($connection)) {
30-
throw new \TypeError(sprintf('Argument 1 passed to %s() must be a string or a connection object, %s given.', __METHOD__, \gettype($connection)));
30+
throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.', __METHOD__, \gettype($connection)));
3131
}
3232

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

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

@@ -80,6 +80,6 @@ public static function createHandler($connection): AbstractSessionHandler
8080
return new PdoSessionHandler($connection);
8181
}
8282

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

0 commit comments

Comments
 (0)