@@ -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 $expiresAfter = null): mixed |
|
| 35 | + public function get(string | \Stringable $cacheKey, callable $callback, DateInterval | int $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 $expiresAfter = null): mixed |
|
| 57 | + public function __invoke(string $cacheKey, callable $callback, DateInterval | int $expiresAfter = null): mixed |
|
| 58 | 58 | { |
| 59 | 59 | return $this->get($cacheKey, $callback, $expiresAfter); |
| 60 | 60 | } |
@@ -77,23 +77,23 @@ |
||
| 77 | 77 | /** |
| 78 | 78 | * @return callable|string |
| 79 | 79 | */ |
| 80 | - public function getDefaultKeyHashFunction(): callable|string; |
|
| 80 | + public function getDefaultKeyHashFunction(): callable | string; |
|
| 81 | 81 | /** |
| 82 | 82 | * @param callable|string $defaultKeyHashFunction |
| 83 | 83 | * @return ConfigurationOption |
| 84 | 84 | * @throws PhpfastcacheInvalidConfigurationException |
| 85 | 85 | */ |
| 86 | - public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static; |
|
| 86 | + public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static; |
|
| 87 | 87 | /** |
| 88 | 88 | * @return callable|string |
| 89 | 89 | */ |
| 90 | - public function getDefaultFileNameHashFunction(): callable|string; |
|
| 90 | + public function getDefaultFileNameHashFunction(): callable | string; |
|
| 91 | 91 | /** |
| 92 | 92 | * @param callable|string $defaultFileNameHashFunction |
| 93 | 93 | * @return ConfigurationOption |
| 94 | 94 | * @throws PhpfastcacheInvalidConfigurationException |
| 95 | 95 | */ |
| 96 | - public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static; |
|
| 96 | + public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static; |
|
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | 99 | * @return string |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | /** |
| 167 | 167 | * @return callable|string |
| 168 | 168 | */ |
| 169 | - public function getDefaultKeyHashFunction(): callable|string |
|
| 169 | + public function getDefaultKeyHashFunction(): callable | string |
|
| 170 | 170 | { |
| 171 | 171 | return $this->defaultKeyHashFunction; |
| 172 | 172 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | * @throws PhpfastcacheInvalidConfigurationException |
| 178 | 178 | * @throws PhpfastcacheLogicException |
| 179 | 179 | */ |
| 180 | - public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static |
|
| 180 | + public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static |
|
| 181 | 181 | { |
| 182 | 182 | $this->enforceLockedProperty(__FUNCTION__); |
| 183 | 183 | if ($defaultKeyHashFunction && !\is_callable($defaultKeyHashFunction) && (\is_string($defaultKeyHashFunction) && !\function_exists($defaultKeyHashFunction))) { |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | /** |
| 191 | 191 | * @return callable|string |
| 192 | 192 | */ |
| 193 | - public function getDefaultFileNameHashFunction(): callable|string |
|
| 193 | + public function getDefaultFileNameHashFunction(): callable | string |
|
| 194 | 194 | { |
| 195 | 195 | return $this->defaultFileNameHashFunction; |
| 196 | 196 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @throws PhpfastcacheInvalidConfigurationException |
| 202 | 202 | * @throws PhpfastcacheLogicException |
| 203 | 203 | */ |
| 204 | - public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static |
|
| 204 | + public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static |
|
| 205 | 205 | { |
| 206 | 206 | $this->enforceLockedProperty(__FUNCTION__); |
| 207 | 207 | if (!\is_callable($defaultFileNameHashFunction) && (\is_string($defaultFileNameHashFunction) && !\function_exists($defaultFileNameHashFunction))) { |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | */ |
| 358 | 358 | protected function getDefaultSuperGlobalAccessor(): \Closure |
| 359 | 359 | { |
| 360 | - return \Closure::fromCallable(static function (string $superGlobalName, ?string $keyName = null): string|int|float|array|bool|null { |
|
| 360 | + return \Closure::fromCallable(static function(string $superGlobalName, ?string $keyName = null): string | int | float | array | bool | null { |
|
| 361 | 361 | return match ($superGlobalName) { |
| 362 | 362 | 'SERVER' => $keyName !== null ? $_SERVER[$keyName] ?? null : $_SERVER, |
| 363 | 363 | 'REQUEST' => $keyName !== null ? $_REQUEST[$keyName] ?? null : $_REQUEST, |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @throws PhpfastcacheDriverException |
| 50 | 50 | * @throws PhpfastcacheDriverNotFoundException |
| 51 | 51 | */ |
| 52 | - public function __construct(string|ExtendedCacheItemPoolInterface $driver, ConfigurationOptionInterface $config = null) |
|
| 52 | + public function __construct(string | ExtendedCacheItemPoolInterface $driver, ConfigurationOptionInterface $config = null) |
|
| 53 | 53 | { |
| 54 | 54 | if ($driver instanceof ExtendedCacheItemPoolInterface) { |
| 55 | 55 | if ($config !== null) { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * @return bool |
| 89 | 89 | * @throws PhpfastcacheSimpleCacheException |
| 90 | 90 | */ |
| 91 | - public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool |
|
| 91 | + public function set(string $key, mixed $value, null | int | \DateInterval $ttl = null): bool |
|
| 92 | 92 | { |
| 93 | 93 | try { |
| 94 | 94 | $cacheItem = $this->internalCacheInstance |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @return bool |
| 161 | 161 | * @throws PhpfastcacheSimpleCacheException |
| 162 | 162 | */ |
| 163 | - public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool |
|
| 163 | + public function setMultiple(iterable $values, null | int | \DateInterval $ttl = null): bool |
|
| 164 | 164 | { |
| 165 | 165 | try { |
| 166 | 166 | foreach ($values as $key => $value) { |
@@ -6,37 +6,37 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit6c951d886d53bc9c3b700a1be3508206 |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'P' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'Psr\\SimpleCache\\' => 16, |
| 13 | 13 | 'Psr\\Cache\\' => 10, |
| 14 | 14 | 'Phpfastcache\\' => 13, |
| 15 | 15 | ), |
| 16 | 16 | ); |
| 17 | 17 | |
| 18 | - public static $prefixDirsPsr4 = array ( |
|
| 18 | + public static $prefixDirsPsr4 = array( |
|
| 19 | 19 | 'Psr\\SimpleCache\\' => |
| 20 | - array ( |
|
| 20 | + array( |
|
| 21 | 21 | 0 => __DIR__ . '/..' . '/psr/simple-cache/src', |
| 22 | 22 | ), |
| 23 | 23 | 'Psr\\Cache\\' => |
| 24 | - array ( |
|
| 24 | + array( |
|
| 25 | 25 | 0 => __DIR__ . '/..' . '/psr/cache/src', |
| 26 | 26 | ), |
| 27 | 27 | 'Phpfastcache\\' => |
| 28 | - array ( |
|
| 28 | + array( |
|
| 29 | 29 | 0 => __DIR__ . '/..' . '/phpfastcache/phpfastcache/lib/Phpfastcache', |
| 30 | 30 | ), |
| 31 | 31 | ); |
| 32 | 32 | |
| 33 | - public static $classMap = array ( |
|
| 33 | + public static $classMap = array( |
|
| 34 | 34 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | 37 | public static function getInitializer(ClassLoader $loader) |
| 38 | 38 | { |
| 39 | - return \Closure::bind(function () use ($loader) { |
|
| 39 | + return \Closure::bind(function() use ($loader) { |
|
| 40 | 40 | $loader->prefixLengthsPsr4 = ComposerStaticInit6c951d886d53bc9c3b700a1be3508206::$prefixLengthsPsr4; |
| 41 | 41 | $loader->prefixDirsPsr4 = ComposerStaticInit6c951d886d53bc9c3b700a1be3508206::$prefixDirsPsr4; |
| 42 | 42 | $loader->classMap = ComposerStaticInit6c951d886d53bc9c3b700a1be3508206::$classMap; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | return false; |
| 451 | 451 | } |
| 452 | 452 | if (null !== $this->apcuPrefix) { |
| 453 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
| 453 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
| 454 | 454 | if ($hit) { |
| 455 | 455 | return $file; |
| 456 | 456 | } |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | if (null !== $this->apcuPrefix) { |
| 467 | - apcu_add($this->apcuPrefix.$class, $file); |
|
| 467 | + apcu_add($this->apcuPrefix . $class, $file); |
|
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | if (false === $file) { |
@@ -325,9 +325,9 @@ |
||
| 325 | 325 | foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { |
| 326 | 326 | if (isset(self::$installedByVendor[$vendorDir])) { |
| 327 | 327 | $installed[] = self::$installedByVendor[$vendorDir]; |
| 328 | - } elseif (is_file($vendorDir.'/composer/installed.php')) { |
|
| 329 | - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; |
|
| 330 | - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { |
|
| 328 | + } elseif (is_file($vendorDir . '/composer/installed.php')) { |
|
| 329 | + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir . '/composer/installed.php'; |
|
| 330 | + if (null === self::$installed && strtr($vendorDir . '/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { |
|
| 331 | 331 | self::$installed = $installed[count($installed) - 1]; |
| 332 | 332 | } |
| 333 | 333 | } |
@@ -14,9 +14,9 @@ |
||
| 14 | 14 | } |
| 15 | 15 | if (!ini_get('display_errors')) { |
| 16 | 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { |
| 17 | - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); |
|
| 17 | + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL . PHP_EOL); |
|
| 18 | 18 | } elseif (!headers_sent()) { |
| 19 | - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; |
|
| 19 | + echo 'Composer detected issues in your platform:' . PHP_EOL . PHP_EOL . str_replace('You are running ' . PHP_VERSION . '.', '', implode(PHP_EOL, $issues)) . PHP_EOL . PHP_EOL; |
|
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | trigger_error( |
@@ -101,5 +101,5 @@ |
||
| 101 | 101 | * @return static |
| 102 | 102 | * The called object. |
| 103 | 103 | */ |
| 104 | - public function expiresAfter(int|\DateInterval|null $time): static; |
|
| 104 | + public function expiresAfter(int | \DateInterval | null $time): static; |
|
| 105 | 105 | } |