Skip to content

Commit 01339b1

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Fix quotes in exception messages Fix quotes in exception messages Fix quotes in exception messages
2 parents c0efac9 + f4dc52b commit 01339b1

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

HeaderBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function getDate(string $key, \DateTime $default = null)
199199
}
200200

201201
if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value)) {
202-
throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value));
202+
throw new \RuntimeException(sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value));
203203
}
204204

205205
return $date;

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
}

Session/Storage/MockArraySessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function registerBag(SessionBagInterface $bag)
186186
public function getBag(string $name)
187187
{
188188
if (!isset($this->bags[$name])) {
189-
throw new \InvalidArgumentException(sprintf('The SessionBagInterface %s is not registered.', $name));
189+
throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name));
190190
}
191191

192192
if (!$this->started) {

Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function registerBag(SessionBagInterface $bag)
311311
public function getBag(string $name)
312312
{
313313
if (!isset($this->bags[$name])) {
314-
throw new \InvalidArgumentException(sprintf('The SessionBagInterface %s is not registered.', $name));
314+
throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name));
315315
}
316316

317317
if (!$this->started && $this->saveHandler->isActive()) {

0 commit comments

Comments
 (0)