Skip to content

Commit 1941ba2

Browse files
Merge branch '5.0'
* 5.0: fix merge Fix more quotes in exception messages Fix more quotes in exception messages Fix more quotes in exception messages [3.4] Minor fixes [PropertyAccess] Improved errors when reading uninitialized properties
2 parents cfd515d + 9ec22ee commit 1941ba2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Store/MemcachedStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(\Memcached $memcached, int $initialTtl = 300)
4646
}
4747

4848
if ($initialTtl < 1) {
49-
throw new InvalidArgumentException(sprintf('%s() expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
49+
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
5050
}
5151

5252
$this->memcached = $memcached;
@@ -74,7 +74,7 @@ public function save(Key $key)
7474
public function putOffExpiration(Key $key, float $ttl)
7575
{
7676
if ($ttl < 1) {
77-
throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
77+
throw new InvalidTtlException(sprintf('"%s()" expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
7878
}
7979

8080
// Interface defines a float value but Store required an integer.

Store/PdoStore.php

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

8787
if ($connOrDsn instanceof \PDO) {
@@ -146,7 +146,7 @@ public function save(Key $key)
146146
public function putOffExpiration(Key $key, float $ttl)
147147
{
148148
if ($ttl < 1) {
149-
throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
149+
throw new InvalidTtlException(sprintf('"%s()" expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
150150
}
151151

152152
$key->reduceLifetime($ttl);

Store/RedisStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private function evaluate(string $script, string $resource, array $args)
141141
return $this->redis->eval(...array_merge([$script, 1, $resource], $args));
142142
}
143143

144-
throw new InvalidArgumentException(sprintf('%s() expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($this->redis)));
144+
throw new InvalidArgumentException(sprintf('"%s()" expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($this->redis)));
145145
}
146146

147147
private function getUniqueToken(Key $key): string

0 commit comments

Comments
 (0)