Passed
Push — v7 ( 968c70...8c8f4f )
by Georges
03:25 queued 01:50
created
lib/Phpfastcache/Config/ConfigurationOption.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
          */
106 106
         if(array_diff_key($array, get_object_vars($this))){
107 107
             throw new PhpfastcacheInvalidConfigurationException(\sprintf(
108
-              'Invalid option(s) for the config %s: %s',
109
-              static::class,
110
-              implode(', ',  array_keys(array_diff_key($array, get_object_vars($this))))
108
+                'Invalid option(s) for the config %s: %s',
109
+                static::class,
110
+                implode(', ',  array_keys(array_diff_key($array, get_object_vars($this))))
111 111
             ));
112 112
         }
113 113
 
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
                     $typeHintExpected = ($parameter instanceof \ReflectionParameter ? ($parameter->getType() === 'object' ? $parameter->getClass() : $parameter->getType()) : 'Unknown type');
140 140
 
141 141
                     throw new PhpfastcacheInvalidConfigurationException(\sprintf(
142
-                      'Invalid type hint found for "%s", expected "%s" got "%s"',
143
-                      lcfirst(substr($method, 3)),
144
-                      $typeHintExpected,
145
-                      $typeHintGot
142
+                        'Invalid type hint found for "%s", expected "%s" got "%s"',
143
+                        lcfirst(substr($method, 3)),
144
+                        $typeHintExpected,
145
+                        $typeHintGot
146 146
                     ));
147 147
                 }
148 148
             }
@@ -360,9 +360,9 @@  discard block
 block discarded – undo
360 360
     {
361 361
         if($fallbackConfig !== null && !($fallbackConfig instanceof self)){
362 362
             throw new PhpfastcacheInvalidArgumentException(\sprintf(
363
-              'Invalid argument "%s" for %s',
364
-              gettype($fallbackConfig) === 'object' ? get_class($fallbackConfig) : gettype($fallbackConfig),
365
-              __METHOD__
363
+                'Invalid argument "%s" for %s',
364
+                gettype($fallbackConfig) === 'object' ? get_class($fallbackConfig) : gettype($fallbackConfig),
365
+                __METHOD__
366 366
             ));
367 367
         }
368 368
         $this->fallbackConfig = $fallbackConfig;
@@ -461,10 +461,10 @@  discard block
 block discarded – undo
461 461
          * by opening a pull request :)
462 462
          */
463 463
         static $safeFileExtensions = [
464
-          'txt',
465
-          'cache',
466
-          'db',
467
-          'pfc',
464
+            'txt',
465
+            'cache',
466
+            'db',
467
+            'pfc',
468 468
         ];
469 469
 
470 470
         if (\strpos($cacheFileExtension, '.') !== false) {
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         }
473 473
         if (!\in_array($cacheFileExtension, $safeFileExtensions, true)) {
474 474
             throw new PhpfastcacheInvalidConfigurationException(
475
-              "Extension \"{$cacheFileExtension}\" is not safe, currently allowed extension names: " . \implode(', ', $safeFileExtensions)
475
+                "Extension \"{$cacheFileExtension}\" is not safe, currently allowed extension names: " . \implode(', ', $safeFileExtensions)
476 476
             );
477 477
         }
478 478
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
     protected static function cleanFileName($filename): string
195 195
     {
196 196
         $regex = [
197
-          '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/',
198
-          '/\.$/',
199
-          '/^\./',
197
+            '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/',
198
+            '/\.$/',
199
+            '/^\./',
200 200
         ];
201 201
         $replace = ['-', '', ''];
202 202
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             $tmpFilename = Directory::getAbsolutePath(\dirname($file) . '/tmp_' . $this->getConfig()->getDefaultFileNameHashFunction()(
293 293
                 \str_shuffle(\uniqid($this->getDriverName(), false))
294 294
                 . \str_shuffle(\uniqid($this->getDriverName(), false))
295
-              ));
295
+                ));
296 296
 
297 297
             $f = \fopen($tmpFilename, 'w+');
298 298
             \flock($f, \LOCK_EX);
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
         }
335 335
 
336 336
         $stat->setData(\implode(', ', \array_keys($this->itemInstances)))
337
-          ->setRawData([
337
+            ->setRawData([
338 338
             'tmp' => $this->tmp,
339
-          ])
340
-          ->setSize(Directory::dirSize($path))
341
-          ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
339
+            ])
340
+            ->setSize(Directory::dirSize($path))
341
+            ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
342 342
 
343 343
         return $stat;
344 344
     }
Please login to merge, or discard this patch.