@@ -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 | /** |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | /** |
| 96 | 96 | * CouchbaseBucket::get() returns a GetResult interface |
| 97 | 97 | */ |
| 98 | - return $this->decodeDocument((array)$this->getCollection()->get($item->getEncodedKey())->content()); |
|
| 98 | + return $this->decodeDocument((array) $this->getCollection()->get($item->getEncodedKey())->content()); |
|
| 99 | 99 | } catch (DocumentNotFoundException) { |
| 100 | 100 | return null; |
| 101 | 101 | } |
@@ -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 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function getStats(): DriverStatistic |
| 50 | 50 | { |
| 51 | - $stats = (array)apcu_cache_info(); |
|
| 51 | + $stats = (array) apcu_cache_info(); |
|
| 52 | 52 | $date = (new DateTime())->setTimestamp($stats['start_time']); |
| 53 | 53 | |
| 54 | 54 | return (new DriverStatistic()) |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ) |
| 62 | 62 | ) |
| 63 | 63 | ->setRawData($stats) |
| 64 | - ->setSize((int)$stats['mem_size']); |
|
| 64 | + ->setSize((int) $stats['mem_size']); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | protected function driverWrite(ExtendedCacheItemInterface $item): bool |
| 81 | 81 | { |
| 82 | 82 | |
| 83 | - return (bool)apcu_store($item->getKey(), $this->driverPreWrap($item), $item->getTtl()); |
|
| 83 | + return (bool) apcu_store($item->getKey(), $this->driverPreWrap($item), $item->getTtl()); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | protected function driverDelete(string $key, string $encodedKey): bool |
| 107 | 107 | { |
| 108 | - return (bool)apcu_delete($key); |
|
| 108 | + return (bool) apcu_delete($key); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | protected function driverDelete(string $key, string $encodedKey): bool |
| 110 | 110 | { |
| 111 | 111 | |
| 112 | - return (bool)zend_disk_cache_delete($key); |
|
| 112 | + return (bool) zend_disk_cache_delete($key); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | protected function driverReadAllKeys(string $pattern = ''): iterable |
| 70 | 70 | { |
| 71 | - return array_filter(array_keys($this->staticStack), function (string $key) use ($pattern) { |
|
| 71 | + return array_filter(array_keys($this->staticStack), function(string $key) use ($pattern) { |
|
| 72 | 72 | return $pattern |
| 73 | 73 | ? preg_match('/' . str_replace('*', '(.*)', $pattern) . '/', $key) |
| 74 | 74 | : true; |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | return (new DriverStatistic()) |
| 57 | 57 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 58 | 58 | ->setRawData($info) |
| 59 | - ->setSize((int)$info['used_memory_dataset']) |
|
| 59 | + ->setSize((int) $info['used_memory_dataset']) |
|
| 60 | 60 | ->setInfo( |
| 61 | 61 | sprintf( |
| 62 | 62 | "The Redis daemon v%s, php-ext v%s, is up since %s.\n For more information see RawData.", |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | /** |
| 118 | 118 | * @throws PhpfastcacheEventManagerException |
| 119 | 119 | */ |
| 120 | - public function on(array|string $events, callable $callback): void |
|
| 120 | + public function on(array | string $events, callable $callback): void |
|
| 121 | 121 | { |
| 122 | 122 | if (is_string($events)) { |
| 123 | 123 | $events = [$events]; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | $this->itemPoolContext = $pool; |
| 186 | 186 | |
| 187 | - $this->onEveryEvents(function (string $eventName, ...$args) { |
|
| 187 | + $this->onEveryEvents(function(string $eventName, ...$args) { |
|
| 188 | 188 | EventManager::getInstance()->dispatch($eventName, ...$args); |
| 189 | 189 | }, 'Scoped' . $pool->getDriverName() . spl_object_hash($this)); |
| 190 | 190 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | /** |
| 241 | 241 | * @throws PhpfastcacheInvalidTypeException |
| 242 | 242 | */ |
| 243 | - public function append(array|string $data): ExtendedCacheItemInterface |
|
| 243 | + public function append(array | string $data): ExtendedCacheItemInterface |
|
| 244 | 244 | { |
| 245 | 245 | if ($this->data !== null && !\is_string($this->data) && !\is_array($this->data)) { |
| 246 | 246 | throw new PhpfastcacheInvalidTypeException(\sprintf('Cannot append on a "%s" type.', \gettype($this->data))); |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | /** |
| 259 | 259 | * @throws PhpfastcacheInvalidTypeException |
| 260 | 260 | */ |
| 261 | - public function prepend(array|string $data): ExtendedCacheItemInterface |
|
| 261 | + public function prepend(array | string $data): ExtendedCacheItemInterface |
|
| 262 | 262 | { |
| 263 | 263 | if ($this->data !== null && !\is_string($this->data) && !\is_array($this->data)) { |
| 264 | 264 | throw new PhpfastcacheInvalidTypeException(\sprintf('Cannot prepend on a "%s" type.', \gettype($this->data))); |