Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46e441f

Browse files
committed
minor #36101 Fix more quotes in exception messages (fabpot)
This PR was merged into the 4.4 branch. Discussion ---------- Fix more quotes in exception messages | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | n/a Commits ------- c79fe02 Fix more quotes in exception messages
2 parents cbe50a7 + c79fe02 commit 46e441f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/Symfony/Component/HttpClient/CurlHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
319319
if ($responses instanceof CurlResponse) {
320320
$responses = [$responses];
321321
} elseif (!is_iterable($responses)) {
322-
throw new \TypeError(sprintf('%s() expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
322+
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
323323
}
324324

325325
$active = 0;

src/Symfony/Component/HttpClient/MockHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
7979
if ($responses instanceof ResponseInterface) {
8080
$responses = [$responses];
8181
} elseif (!is_iterable($responses)) {
82-
throw new \TypeError(sprintf('%s() expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
82+
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
8383
}
8484

8585
return new ResponseStream(MockResponse::stream($responses, $timeout));

src/Symfony/Component/HttpClient/NativeHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
238238
if ($responses instanceof NativeResponse) {
239239
$responses = [$responses];
240240
} elseif (!is_iterable($responses)) {
241-
throw new \TypeError(sprintf('%s() expects parameter 1 to be an iterable of NativeResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
241+
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of NativeResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
242242
}
243243

244244
return new ResponseStream(NativeResponse::stream($responses, $timeout));

src/Symfony/Component/HttpFoundation/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'])) {

src/Symfony/Component/Lock/Store/PdoStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __construct($connOrDsn, array $options = [], float $gcProbabilit
8282
throw new InvalidArgumentException(sprintf('"%s" requires gcProbability between 0 and 1, "%f" given.', __METHOD__, $gcProbability));
8383
}
8484
if ($initialTtl < 1) {
85-
throw new InvalidTtlException(sprintf('%s() expects a strictly positive TTL, "%d" given.', __METHOD__, $initialTtl));
85+
throw new InvalidTtlException(sprintf('"%s()" expects a strictly positive TTL, "%d" given.', __METHOD__, $initialTtl));
8686
}
8787

8888
if ($connOrDsn instanceof \PDO) {
@@ -156,7 +156,7 @@ public function waitAndSave(Key $key)
156156
public function putOffExpiration(Key $key, $ttl)
157157
{
158158
if ($ttl < 1) {
159-
throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
159+
throw new InvalidTtlException(sprintf('"%s()" expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
160160
}
161161

162162
$key->reduceLifetime($ttl);

0 commit comments

Comments
 (0)