@@ -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 |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @throws InvalidArgumentException |
| 34 | 34 | */ |
| 35 | - public function get(string|\Stringable $cacheKey, callable $callback, DateInterval|int|null $expiresAfter = null): mixed |
|
| 35 | + public function get(string | \Stringable $cacheKey, callable $callback, DateInterval | int | null $expiresAfter = null): mixed |
|
| 36 | 36 | { |
| 37 | 37 | $cacheItem = $this->cacheInstance->getItem((string) $cacheKey); |
| 38 | 38 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * @throws InvalidArgumentException |
| 56 | 56 | */ |
| 57 | - public function __invoke(string $cacheKey, callable $callback, DateInterval|int|null $expiresAfter = null): mixed |
|
| 57 | + public function __invoke(string $cacheKey, callable $callback, DateInterval | int | null $expiresAfter = null): mixed |
|
| 58 | 58 | { |
| 59 | 59 | return $this->get($cacheKey, $callback, $expiresAfter); |
| 60 | 60 | } |