@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | /** |
| 147 | 147 | * @return callable|string |
| 148 | 148 | */ |
| 149 | - public function getDefaultKeyHashFunction(): callable|string |
|
| 149 | + public function getDefaultKeyHashFunction(): callable | string |
|
| 150 | 150 | { |
| 151 | 151 | return $this->defaultKeyHashFunction; |
| 152 | 152 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * @return ConfigurationOption |
| 157 | 157 | * @throws PhpfastcacheInvalidConfigurationException |
| 158 | 158 | */ |
| 159 | - public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static |
|
| 159 | + public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static |
|
| 160 | 160 | { |
| 161 | 161 | if ($defaultKeyHashFunction && !\is_callable($defaultKeyHashFunction) && (\is_string($defaultKeyHashFunction) && !\function_exists($defaultKeyHashFunction))) { |
| 162 | 162 | throw new PhpfastcacheInvalidConfigurationException('defaultKeyHashFunction must be a valid function name string'); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | /** |
| 169 | 169 | * @return callable|string |
| 170 | 170 | */ |
| 171 | - public function getDefaultFileNameHashFunction(): callable|string |
|
| 171 | + public function getDefaultFileNameHashFunction(): callable | string |
|
| 172 | 172 | { |
| 173 | 173 | return $this->defaultFileNameHashFunction; |
| 174 | 174 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * @return ConfigurationOption |
| 179 | 179 | * @throws PhpfastcacheInvalidConfigurationException |
| 180 | 180 | */ |
| 181 | - public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static |
|
| 181 | + public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static |
|
| 182 | 182 | { |
| 183 | 183 | if (!\is_callable($defaultFileNameHashFunction) && (\is_string($defaultFileNameHashFunction) && !\function_exists($defaultFileNameHashFunction))) { |
| 184 | 184 | throw new PhpfastcacheInvalidConfigurationException('defaultFileNameHashFunction must be a valid function name string'); |
@@ -307,8 +307,8 @@ discard block |
||
| 307 | 307 | */ |
| 308 | 308 | protected function getDefaultSuperGlobalAccessor(): \Closure |
| 309 | 309 | { |
| 310 | - return \Closure::fromCallable(static function (string $superGlobalName, ?string $keyName = null) { |
|
| 311 | - return match ($superGlobalName) { |
|
| 310 | + return \Closure::fromCallable(static function(string $superGlobalName, ?string $keyName = null) { |
|
| 311 | + return match($superGlobalName) { |
|
| 312 | 312 | 'SERVER' => $keyName !== null ? $_SERVER[$keyName] ?? null : $_SERVER, |
| 313 | 313 | 'REQUEST' => $keyName !== null ? $_REQUEST[$keyName] ?? null : $_REQUEST, |
| 314 | 314 | 'COOKIE' => $keyName !== null ? $_COOKIE[$keyName] ?? null : $_COOKIE, |
@@ -208,7 +208,7 @@ |
||
| 208 | 208 | * Reset the Item |
| 209 | 209 | */ |
| 210 | 210 | $item->set(null) |
| 211 | - ->expiresAfter(abs((int)$this->getConfig()->getDefaultTtl())) |
|
| 211 | + ->expiresAfter(abs((int) $this->getConfig()->getDefaultTtl())) |
|
| 212 | 212 | ->setHit(false) |
| 213 | 213 | ->setTags([]); |
| 214 | 214 | if ($this->getConfig()->isItemDetailedDate()) { |
@@ -324,7 +324,7 @@ |
||
| 324 | 324 | ->setSize($rawData['collectionCount']); |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | - public function getConfig() : Config|ConfigurationOption |
|
| 327 | + public function getConfig() : Config | ConfigurationOption |
|
| 328 | 328 | { |
| 329 | 329 | return $this->config; |
| 330 | 330 | } |