Passed
Push — v9 ( e6f9d3...0a233b )
by Georges
02:05
created
lib/Phpfastcache/Config/ConfigurationOption.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     /**
157 157
      * @return callable|string
158 158
      */
159
-    public function getDefaultKeyHashFunction(): callable|string
159
+    public function getDefaultKeyHashFunction(): callable | string
160 160
     {
161 161
         return $this->defaultKeyHashFunction;
162 162
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * @throws  PhpfastcacheInvalidConfigurationException
168 168
      * @throws PhpfastcacheLogicException
169 169
      */
170
-    public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static
170
+    public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static
171 171
     {
172 172
         $this->enforceLockedProperty(__FUNCTION__);
173 173
         if ($defaultKeyHashFunction && !\is_callable($defaultKeyHashFunction) && (\is_string($defaultKeyHashFunction) && !\function_exists($defaultKeyHashFunction))) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     /**
181 181
      * @return callable|string
182 182
      */
183
-    public function getDefaultFileNameHashFunction(): callable|string
183
+    public function getDefaultFileNameHashFunction(): callable | string
184 184
     {
185 185
         return $this->defaultFileNameHashFunction;
186 186
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      * @throws  PhpfastcacheInvalidConfigurationException
192 192
      * @throws PhpfastcacheLogicException
193 193
      */
194
-    public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static
194
+    public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static
195 195
     {
196 196
         $this->enforceLockedProperty(__FUNCTION__);
197 197
         if (!\is_callable($defaultFileNameHashFunction) && (\is_string($defaultFileNameHashFunction) && !\function_exists($defaultFileNameHashFunction))) {
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
      */
332 332
     protected function getDefaultSuperGlobalAccessor(): \Closure
333 333
     {
334
-        return \Closure::fromCallable(static function (string $superGlobalName, ?string $keyName = null) {
335
-            return match ($superGlobalName) {
334
+        return \Closure::fromCallable(static function(string $superGlobalName, ?string $keyName = null) {
335
+            return match($superGlobalName) {
336 336
                 'SERVER' => $keyName !== null ? $_SERVER[$keyName] ?? null : $_SERVER,
337 337
                 'REQUEST' => $keyName !== null ? $_REQUEST[$keyName] ?? null : $_REQUEST,
338 338
                 'COOKIE' => $keyName !== null ? $_COOKIE[$keyName] ?? null : $_COOKIE,
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/DriverBaseTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
     protected ConfigurationOptionInterface $config;
37 37
 
38
-    protected object|array|null $instance;
38
+    protected object | array | null $instance;
39 39
 
40 40
     protected string $driverName;
41 41
 
Please login to merge, or discard this patch.
lib/Phpfastcache/CacheManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $config = self::validateConfig($config);
100 100
         $driver = self::standardizeDriverName($driver);
101
-        $instanceId = $instanceId ?: md5($driver . \serialize(\array_filter($config->toArray(), static fn ($val) => !\is_callable($val))));
101
+        $instanceId = $instanceId ?: md5($driver . \serialize(\array_filter($config->toArray(), static fn($val) => !\is_callable($val))));
102 102
 
103 103
         if (!isset(self::$instances[$instanceId])) {
104 104
             $driverClass = self::validateDriverClass(self::getDriverClass($driver));
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         $found = false;
223 223
         self::$instances = \array_filter(
224 224
             \array_map(
225
-                static function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
225
+                static function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
226 226
                     if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) {
227 227
                         $found = true;
228 228
                         return null;
Please login to merge, or discard this patch.