Completed
Pull Request — final (#427)
by Georges
04:27 queued 02:09
created
src/phpFastCache/CacheManager.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
             $class = self::getNamespacePath() . $driver . '\Driver';
96 96
             try{
97 97
                 self::$instances[ $instance ] = new $class($config);
98
-            }catch(phpFastCacheDriverCheckException $e){
98
+            } catch(phpFastCacheDriverCheckException $e){
99 99
                 $fallback = self::standardizeDriverName($config['fallback']);
100 100
                 if($fallback && $fallback !== $driver){
101 101
                     $class = self::getNamespacePath() . $fallback . '\Driver';
102 102
                     self::$instances[ $instance ] = new $class($config);
103 103
                     trigger_error(sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver, $fallback), E_USER_WARNING);
104
-                }else{
104
+                } else{
105 105
                     throw new phpFastCacheDriverCheckException($e->getMessage(), $e->getCode(), $e);
106 106
                 }
107 107
             }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             self::$config = array_merge(self::$config, $name);
199 199
         } else if (is_string($name)){
200 200
             self::$config[ $name ] = $value;
201
-        }else{
201
+        } else{
202 202
             throw new \InvalidArgumentException('Invalid variable type: $name');
203 203
         }
204 204
     }
Please login to merge, or discard this patch.
src/phpFastCache/Core/StandardPsr6StructureTrait.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
     {
216 216
         if (!array_key_exists($item->getKey(), $this->itemInstances)) {
217 217
             $this->itemInstances[ $item->getKey() ] = $item;
218
-        }else if(spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
218
+        } else if(spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
219 219
             throw new \RuntimeException('Spl object hash mismatches ! You probably tried to save a detached item which has been already retrieved from cache.');
220 220
         }
221 221
 
Please login to merge, or discard this patch.
src/phpFastCache/Core/ExtendedCacheItemPoolTrait.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     {
327 327
         if(isset($this->itemInstances[$item->getKey()]) && spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
328 328
             throw new \LogicException('The item already exists and cannot be overwritten because the Spl object hash mismatches ! You probably tried to re-attach a detached item which has been already retrieved from cache.');
329
-        }else{
329
+        } else{
330 330
             $this->itemInstances[$item->getKey()] = $item;
331 331
         }
332 332
     }
@@ -342,9 +342,9 @@  discard block
 block discarded – undo
342 342
         if($item instanceof CacheItemInterface){
343 343
             unset($this->itemInstances[ $item->getKey() ]);
344 344
 
345
-        }else if(is_string($item)){
345
+        } else if(is_string($item)){
346 346
             unset($this->itemInstances[ $item ]);
347
-        }else{
347
+        } else{
348 348
             throw new \InvalidArgumentException('Invalid type for $item variable');
349 349
         }
350 350
         if(gc_enabled()){
Please login to merge, or discard this patch.
src/phpFastCache/Core/PathSeekerTrait.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,11 +78,11 @@
 block discarded – undo
78 78
                 return $full_path_tmp;
79 79
             }
80 80
             return $full_path;
81
-        }else{
81
+        } else{
82 82
             if (!isset($this->tmp[ $full_path_hash ]) || (!@file_exists($full_path) || !@is_writable($full_path))) {
83 83
                 if (!@file_exists($full_path)) {
84 84
                     @mkdir($full_path, $this->setChmodAuto(), true);
85
-                }elseif (!@is_writable($full_path)) {
85
+                } elseif (!@is_writable($full_path)) {
86 86
                     if (!@chmod($full_path, $this->setChmodAuto()))
87 87
                     {
88 88
                         /**
Please login to merge, or discard this patch.
src/phpFastCache/Proxy/phpFastCacheAbstractProxy.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     {
77 77
         if(method_exists($this->instance, $name)){
78 78
             return call_user_func_array([$this->instance, $name], $args);
79
-        }else{
79
+        } else{
80 80
             throw new \BadMethodCallException(sprintf('Method %s does not exists', $name));
81 81
         }
82 82
     }
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
         if (is_readable($path)) {
33 33
             require_once $path;
34
-        }else{
34
+        } else{
35 35
             trigger_error('Cannot locate the Psr/Cache files', E_USER_ERROR);
36 36
         }
37 37
         return;
Please login to merge, or discard this patch.