@@ -318,7 +318,7 @@ |
||
| 318 | 318 | $found = false; |
| 319 | 319 | self::$instances = \array_filter( |
| 320 | 320 | \array_map( |
| 321 | - static function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) { |
|
| 321 | + static function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) { |
|
| 322 | 322 | if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) { |
| 323 | 323 | $found = true; |
| 324 | 324 | return null; |
@@ -363,7 +363,7 @@ |
||
| 363 | 363 | public function debugEvents(EventManagerInterface $eventManager) |
| 364 | 364 | { |
| 365 | 365 | $eventManager->onEveryEvents( |
| 366 | - function (string $eventName) { |
|
| 366 | + function(string $eventName) { |
|
| 367 | 367 | $this->printDebugText("Triggered event '{$eventName}'"); |
| 368 | 368 | }, |
| 369 | 369 | 'debugCallback' |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | } |
| 154 | 154 | try { |
| 155 | 155 | return \array_map( |
| 156 | - function (ExtendedCacheItemInterface $item) { |
|
| 156 | + function(ExtendedCacheItemInterface $item) { |
|
| 157 | 157 | return $item->get(); |
| 158 | 158 | }, |
| 159 | 159 | $this->internalCacheInstance->getItems($keys) |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function getStats(): DriverStatistic |
| 60 | 60 | { |
| 61 | - $stats = (array)zend_shm_cache_info(); |
|
| 61 | + $stats = (array) zend_shm_cache_info(); |
|
| 62 | 62 | return (new DriverStatistic()) |
| 63 | 63 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 64 | 64 | ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total'])) |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * Check for Cross-Driver type confusion |
| 125 | 125 | */ |
| 126 | 126 | if ($item instanceof Item) { |
| 127 | - return (bool)zend_shm_cache_delete($item->getKey()); |
|
| 127 | + return (bool) zend_shm_cache_delete($item->getKey()); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -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 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | return (new DriverStatistic()) |
| 56 | 56 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 57 | 57 | ->setRawData($info) |
| 58 | - ->setSize((int)$info['used_memory']) |
|
| 58 | + ->setSize((int) $info['used_memory']) |
|
| 59 | 59 | ->setInfo( |
| 60 | 60 | sprintf( |
| 61 | 61 | "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | * Check for Cross-Driver type confusion |
| 172 | 172 | */ |
| 173 | 173 | if ($item instanceof Item) { |
| 174 | - return (bool)$this->instance->del($item->getKey()); |
|
| 174 | + return (bool) $this->instance->del($item->getKey()); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | return (new DriverStatistic()) |
| 76 | 76 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 77 | 77 | ->setRawData($info) |
| 78 | - ->setSize((int)$size) |
|
| 78 | + ->setSize((int) $size) |
|
| 79 | 79 | ->setInfo( |
| 80 | 80 | sprintf( |
| 81 | 81 | "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * @see https://redis.io/commands/expire |
| 173 | 173 | */ |
| 174 | 174 | if ($ttl <= 0) { |
| 175 | - return (bool)$this->instance->expire($item->getKey(), 0); |
|
| 175 | + return (bool) $this->instance->expire($item->getKey(), 0); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload() === 'OK'; |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * Check for Cross-Driver type confusion |
| 199 | 199 | */ |
| 200 | 200 | if ($item instanceof Item) { |
| 201 | - return (bool)$this->instance->del([$item->getKey()]); |
|
| 201 | + return (bool) $this->instance->del([$item->getKey()]); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -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 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * Check for Cross-Driver type confusion |
| 118 | 118 | */ |
| 119 | 119 | if ($item instanceof Item) { |
| 120 | - return (bool)$this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl()); |
|
| 120 | + return (bool) $this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl()); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * Check for Cross-Driver type confusion |
| 135 | 135 | */ |
| 136 | 136 | if ($item instanceof Item) { |
| 137 | - return (bool)$this->instance->del($item->getEncodedKey()); |
|
| 137 | + return (bool) $this->instance->del($item->getEncodedKey()); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -151,6 +151,6 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | protected function driverClear(): bool |
| 153 | 153 | { |
| 154 | - return (bool)$this->instance->flushdb('kv'); |
|
| 154 | + return (bool) $this->instance->flushdb('kv'); |
|
| 155 | 155 | } |
| 156 | 156 | } |