Skip to content

Commit a4911b4

Browse files
Merge branch '4.1'
* 4.1: Fix Clidumper tests Enable the fixer enforcing fully-qualified calls for compiler-optimized functions Apply fixers Disable the native_constant_invocation fixer until it can be scoped Update the list of excluded files for the CS fixer
2 parents 874c544 + 3e85748 commit a4911b4

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Store/CombinedStore.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(array $stores, StrategyInterface $strategy)
4646
{
4747
foreach ($stores as $store) {
4848
if (!$store instanceof StoreInterface) {
49-
throw new InvalidArgumentException(sprintf('The store must implement "%s". Got "%s".', StoreInterface::class, get_class($store)));
49+
throw new InvalidArgumentException(sprintf('The store must implement "%s". Got "%s".', StoreInterface::class, \get_class($store)));
5050
}
5151
}
5252

@@ -62,7 +62,7 @@ public function save(Key $key)
6262
{
6363
$successCount = 0;
6464
$failureCount = 0;
65-
$storesCount = count($this->stores);
65+
$storesCount = \count($this->stores);
6666

6767
foreach ($this->stores as $store) {
6868
try {
@@ -92,7 +92,7 @@ public function save(Key $key)
9292

9393
public function waitAndSave(Key $key)
9494
{
95-
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', get_class($this)));
95+
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
9696
}
9797

9898
/**
@@ -102,7 +102,7 @@ public function putOffExpiration(Key $key, $ttl)
102102
{
103103
$successCount = 0;
104104
$failureCount = 0;
105-
$storesCount = count($this->stores);
105+
$storesCount = \count($this->stores);
106106
$expireAt = microtime(true) + $ttl;
107107

108108
foreach ($this->stores as $store) {
@@ -164,7 +164,7 @@ public function exists(Key $key)
164164
{
165165
$successCount = 0;
166166
$failureCount = 0;
167-
$storesCount = count($this->stores);
167+
$storesCount = \count($this->stores);
168168

169169
foreach ($this->stores as $store) {
170170
if ($store->exists($key)) {

Store/MemcachedStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MemcachedStore implements StoreInterface
3131

3232
public static function isSupported()
3333
{
34-
return extension_loaded('memcached');
34+
return \extension_loaded('memcached');
3535
}
3636

3737
/**
@@ -71,7 +71,7 @@ public function save(Key $key)
7171

7272
public function waitAndSave(Key $key)
7373
{
74-
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', get_class($this)));
74+
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
7575
}
7676

7777
/**

Store/RedisStore.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class RedisStore implements StoreInterface
3535
public function __construct($redisClient, float $initialTtl = 300.0)
3636
{
3737
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\Client && !$redisClient instanceof RedisProxy) {
38-
throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, is_object($redisClient) ? get_class($redisClient) : gettype($redisClient)));
38+
throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
3939
}
4040

4141
if ($initialTtl <= 0) {
@@ -71,7 +71,7 @@ public function save(Key $key)
7171

7272
public function waitAndSave(Key $key)
7373
{
74-
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', get_class($this)));
74+
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
7575
}
7676

7777
/**
@@ -137,10 +137,10 @@ private function evaluate(string $script, string $resource, array $args)
137137
}
138138

139139
if ($this->redis instanceof \Predis\Client) {
140-
return call_user_func_array(array($this->redis, 'eval'), array_merge(array($script, 1, $resource), $args));
140+
return \call_user_func_array(array($this->redis, 'eval'), array_merge(array($script, 1, $resource), $args));
141141
}
142142

143-
throw new InvalidArgumentException(sprintf('%s() expects been initialized with a Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, is_object($this->redis) ? get_class($this->redis) : gettype($this->redis)));
143+
throw new InvalidArgumentException(sprintf('%s() expects been initialized with a Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, \is_object($this->redis) ? \get_class($this->redis) : \gettype($this->redis)));
144144
}
145145

146146
/**

Store/SemaphoreStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SemaphoreStore implements StoreInterface
3232
*/
3333
public static function isSupported()
3434
{
35-
return extension_loaded('sysvsem');
35+
return \extension_loaded('sysvsem');
3636
}
3737

3838
public function __construct()

Store/StoreFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public static function createStore($connection)
3535
return new MemcachedStore($connection);
3636
}
3737

38-
throw new InvalidArgumentException(sprintf('Unsupported Connection: %s.', get_class($connection)));
38+
throw new InvalidArgumentException(sprintf('Unsupported Connection: %s.', \get_class($connection)));
3939
}
4040
}

0 commit comments

Comments
 (0)