@@ -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 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | protected function driverWrite(ExtendedCacheItemInterface $item): bool |
79 | 79 | { |
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 | /** |
@@ -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 |
@@ -211,7 +211,7 @@ |
||
211 | 211 | /** @var $item ExtendedCacheItemInterface */ |
212 | 212 | $item = new (self::getItemClass())($this, $key, $this->eventManager); |
213 | 213 | |
214 | - $getItemDriverRead = function (float $cacheSlamsSpendSeconds = 0) use (&$getItemDriverRead, $item): void { |
|
214 | + $getItemDriverRead = function(float $cacheSlamsSpendSeconds = 0) use (&$getItemDriverRead, $item): void { |
|
215 | 215 | $config = $this->getConfig(); |
216 | 216 | |
217 | 217 | $driverArray = $this->driverRead($item); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | ]; |
184 | 184 | |
185 | 185 | if ($this->getConfig()->isItemDetailedDate()) { |
186 | - $wrap[ExtendedCacheItemPoolInterface::DRIVER_MDATE_WRAPPER_INDEX] = new DateTime();// Always on the latest date |
|
186 | + $wrap[ExtendedCacheItemPoolInterface::DRIVER_MDATE_WRAPPER_INDEX] = new DateTime(); // Always on the latest date |
|
187 | 187 | /** |
188 | 188 | * If the creation date exists |
189 | 189 | * reuse it else set a new Date |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | } |
196 | 196 | |
197 | 197 | if ($stringifyDate) { |
198 | - \array_walk($wrap, static function (mixed &$value, string $key): void { |
|
198 | + \array_walk($wrap, static function(mixed &$value, string $key): void { |
|
199 | 199 | if ($value instanceof DateTimeInterface && $key !== ExtendedCacheItemPoolInterface::DRIVER_DATA_WRAPPER_INDEX) { |
200 | 200 | $value = $value->format(DateTimeInterface::W3C); |
201 | 201 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | * @param string[]|string $events |
90 | 90 | * @param callable $callback |
91 | 91 | */ |
92 | - public function on(array|string $events, callable $callback): void; |
|
92 | + public function on(array | string $events, callable $callback): void; |
|
93 | 93 | |
94 | 94 | /** |
95 | 95 | * @param string $eventName |