@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function getStats(): DriverStatistic |
| 74 | 74 | { |
| 75 | - $stats = (array)$this->instance->getstats(); |
|
| 75 | + $stats = (array) $this->instance->getstats(); |
|
| 76 | 76 | $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0); |
| 77 | 77 | $stats['version'] = (isset($stats['version']) ? $stats['version'] : 'UnknownVersion'); |
| 78 | 78 | $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 84 | 84 | ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822))) |
| 85 | 85 | ->setRawData($stats) |
| 86 | - ->setSize((int)$stats['bytes']); |
|
| 86 | + ->setSize((int) $stats['bytes']); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 79 | 79 | ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822))) |
| 80 | 80 | ->setRawData($stats) |
| 81 | - ->setSize((int)$stats['bytes']); |
|
| 81 | + ->setSize((int) $stats['bytes']); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | \implode( |
| 200 | 200 | ', ', |
| 201 | 201 | \array_map( |
| 202 | - static fn (ExtendedCacheItemPoolInterface $pool) => \get_class($pool), |
|
| 202 | + static fn(ExtendedCacheItemPoolInterface $pool) => \get_class($pool), |
|
| 203 | 203 | $this->clusterPools |
| 204 | 204 | ) |
| 205 | 205 | ) |
@@ -207,9 +207,9 @@ discard block |
||
| 207 | 207 | ); |
| 208 | 208 | |
| 209 | 209 | $stats->setSize( |
| 210 | - (int)\array_sum( |
|
| 210 | + (int) \array_sum( |
|
| 211 | 211 | \array_map( |
| 212 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getSize(), |
|
| 212 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getSize(), |
|
| 213 | 213 | $this->clusterPools |
| 214 | 214 | ) |
| 215 | 215 | ) |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | \implode( |
| 220 | 220 | ', ', |
| 221 | 221 | \array_map( |
| 222 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getData(), |
|
| 222 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getData(), |
|
| 223 | 223 | $this->clusterPools |
| 224 | 224 | ) |
| 225 | 225 | ) |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function getStats(): DriverStatistic |
| 57 | 57 | { |
| 58 | - $stats = (array)zend_shm_cache_info(); |
|
| 58 | + $stats = (array) zend_shm_cache_info(); |
|
| 59 | 59 | return (new DriverStatistic()) |
| 60 | 60 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 61 | 61 | ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total'])) |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | $this->assertCacheItemType($item, Item::class); |
| 110 | 110 | |
| 111 | - return (bool)zend_shm_cache_delete($item->getKey()); |
|
| 111 | + return (bool) zend_shm_cache_delete($item->getKey()); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | protected function driverClear(): bool |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | { |
| 110 | 110 | $this->assertCacheItemType($item, Item::class); |
| 111 | 111 | |
| 112 | - return (bool)zend_disk_cache_delete($item->getKey()); |
|
| 112 | + return (bool) zend_disk_cache_delete($item->getKey()); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | protected string $host = '127.0.0.1'; |
| 25 | 25 | |
| 26 | - protected int $port = 8091;// SSL: 18091 |
|
| 26 | + protected int $port = 8091; // SSL: 18091 |
|
| 27 | 27 | |
| 28 | 28 | protected string $username = ''; |
| 29 | 29 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | return (new DriverStatistic()) |
| 53 | 53 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 54 | 54 | ->setRawData($info) |
| 55 | - ->setSize((int)$info['used_memory']) |
|
| 55 | + ->setSize((int) $info['used_memory']) |
|
| 56 | 56 | ->setInfo( |
| 57 | 57 | sprintf( |
| 58 | 58 | "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | { |
| 161 | 161 | $this->assertCacheItemType($item, Item::class); |
| 162 | 162 | |
| 163 | - return (bool)$this->instance->del($item->getKey()); |
|
| 163 | + return (bool) $this->instance->del($item->getKey()); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | return (new DriverStatistic()) |
| 75 | 75 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 76 | 76 | ->setRawData($info) |
| 77 | - ->setSize((int)$size) |
|
| 77 | + ->setSize((int) $size) |
|
| 78 | 78 | ->setInfo( |
| 79 | 79 | sprintf( |
| 80 | 80 | "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | * @see https://redis.io/commands/expire |
| 168 | 168 | */ |
| 169 | 169 | if ($ttl <= 0) { |
| 170 | - return (bool)$this->instance->expire($item->getKey(), 0); |
|
| 170 | + return (bool) $this->instance->expire($item->getKey(), 0); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | return $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload() === 'OK'; |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | { |
| 183 | 183 | $this->assertCacheItemType($item, Item::class); |
| 184 | 184 | |
| 185 | - return (bool)$this->instance->del([$item->getKey()]); |
|
| 185 | + return (bool) $this->instance->del([$item->getKey()]); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | $this->assertCacheItemType($item, Item::class); |
| 80 | 80 | |
| 81 | - return (bool)$this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item))); |
|
| 81 | + return (bool) $this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item))); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |