Completed
Push — V6 ( 8f6ce3...bd9922 )
by Georges
02:27
created
src/phpFastCache/Proxy/phpFastCacheAbstractProxy.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
         
274 274
         if (!is_dir($path)) {
275 275
             throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94);
276
-        }else{
276
+        } else{
277 277
             $size = Directory::dirSize($path);
278 278
         }
279 279
 
Please login to merge, or discard this patch.
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/Item/ItemExtendedTrait.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         if($this->driver->getConfig()['itemDetailedDate']){
71 71
             return $this->creationDate;
72
-        }else{
72
+        } else{
73 73
             throw new \LogicException('Cannot access to the creation date when the "itemDetailedDate" configuration is disabled.');
74 74
         }
75 75
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         if($this->driver->getConfig()['itemDetailedDate']){
85 85
             $this->creationDate = $date;
86 86
             return $this;
87
-        }else{
87
+        } else{
88 88
             throw new \LogicException('Cannot access to the creation date when the "itemDetailedDate" configuration is disabled.');
89 89
         }
90 90
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         if($this->driver->getConfig()['itemDetailedDate']){
99 99
             return $this->modificationDate;
100
-        }else{
100
+        } else{
101 101
             throw new \LogicException('Cannot access to the modification date when the "itemDetailedDate" configuration is disabled.');
102 102
         }
103 103
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if($this->driver->getConfig()['itemDetailedDate']){
113 113
             $this->modificationDate = $date;
114 114
             return $this;
115
-        }else{
115
+        } else{
116 116
             throw new \LogicException('Cannot access to the creation date when the "itemDetailedDate" configuration is disabled.');
117 117
         }
118 118
     }
Please login to merge, or discard this patch.
src/phpFastCache/Core/Pool/DriverBaseTrait.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
         
274 274
         if (!is_dir($path)) {
275 275
             throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94);
276
-        }else{
276
+        } else{
277 277
             $size = Directory::dirSize($path);
278 278
         }
279 279
 
Please login to merge, or discard this patch.
src/phpFastCache/Core/Pool/CacheItemPoolTrait.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     } else {
86 86
                         $item->setHit(true);
87 87
                     }
88
-                }else{
88
+                } else{
89 89
                     $item->expiresAfter(abs((int) $this->getConfig()[ 'defaultTtl' ]));
90 90
                 }
91 91
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     {
230 230
         if (!array_key_exists($item->getKey(), $this->itemInstances)) {
231 231
             $this->itemInstances[ $item->getKey() ] = $item;
232
-        }else if(spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
232
+        } else if(spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
233 233
             throw new \RuntimeException('Spl object hash mismatches ! You probably tried to save a detached item which has been already retrieved from cache.');
234 234
         }
235 235
 
Please login to merge, or discard this patch.
src/phpFastCache/Helper/ActOnAll.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
                     } else {
84 84
                         $item->setHit(true);
85 85
                     }
86
-                }else{
86
+                } else{
87 87
                     $item->expiresAfter(abs((int) $this->getConfig()[ 'defaultTtl' ]));
88 88
                 }
89 89
 
Please login to merge, or discard this patch.
src/phpFastCache/EventManager.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,13 +84,13 @@
 block discarded – undo
84 84
             if(is_callable($arguments[0])){
85 85
                 if(isset($arguments[1]) && is_string($arguments[0])){
86 86
                     $this->events[$name][$arguments[1]] = $arguments[0];
87
-                }else {
87
+                } else {
88 88
                     $this->events[$name][] = $arguments[0];
89 89
                 }
90
-            }else{
90
+            } else{
91 91
                 throw new \InvalidArgumentException(sprintf('Expected Callable, got "%s"', gettype($arguments[0])));
92 92
             }
93
-        }else{
93
+        } else{
94 94
             throw new \BadMethodCallException('An event must start with "on" such as "onCacheGetItem"');
95 95
         }
96 96
     }
Please login to merge, or discard this patch.
src/phpFastCache/Core/Pool/IO/IOHelperTrait.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
                 return $tmp_dir;
98 98
             }
99 99
             return $full_path;
100
-        }else{
100
+        } else{
101 101
             if (!isset($this->tmp[ $full_path_hash ]) || (!@file_exists($full_path) || !@is_writable($full_path))) {
102 102
                 if (!@file_exists($full_path)) {
103 103
                     @mkdir($full_path, $this->setChmodAuto(), true);
104
-                }else if (!@is_writable($full_path)) {
104
+                } else if (!@is_writable($full_path)) {
105 105
                     @chmod($full_path, $this->setChmodAuto());
106 106
                 }
107 107
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             if(!rename($tmpFilename, $file)){
313 313
                 throw new phpFastCacheIOException(sprintf('Failed to rename %s to %s', $tmpFilename, $file));
314 314
             }
315
-        }else{
315
+        } else{
316 316
             $f = fopen($file, 'w+');
317 317
             $octetWritten = fwrite($f, $data);
318 318
             fclose($f);
Please login to merge, or discard this patch.
src/phpFastCache/Core/Pool/ExtendedCacheItemPoolTrait.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         foreach (array_unique($tagNames) as $tagName) {
85 85
             if(is_string($tagName)){
86 86
                 $items = array_merge($items, $this->getItemsByTag($tagName));
87
-            }else{
87
+            } else{
88 88
                 throw new InvalidArgumentException('$tagName must be a a string');
89 89
             }
90 90
         }
Please login to merge, or discard this patch.