Completed
Push — V6 ( 8533dc...481103 )
by Georges
02:36
created
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/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.
src/phpFastCache/Drivers/Cassandra/Driver.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
             if($results instanceof Cassandra\Rows && $results->count() === 1){
132 132
                 return $this->decode($results->first()['cache_data']);
133
-            }else{
133
+            } else{
134 134
                 return null;
135 135
             }
136 136
         } catch (Cassandra\Exception $e) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             if(!empty($this->config['ssl']['enabled'])){
218 218
                 if(!empty($this->config['ssl']['verify'])){
219 219
                     $sslBuilder = Cassandra::ssl()->withVerifyFlags(Cassandra::VERIFY_PEER_CERT);
220
-                }else{
220
+                } else{
221 221
                     $sslBuilder = Cassandra::ssl()->withVerifyFlags(Cassandra::VERIFY_NONE);
222 222
                 }
223 223
 
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/phpFastCache/CacheManager.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
             try{
110 110
                 self::$instances[ $instance ] = new $class($config);
111 111
                 self::$instances[ $instance ]->setEventManager(EventManager::getInstance());
112
-            }catch(phpFastCacheDriverCheckException $e){
112
+            } catch(phpFastCacheDriverCheckException $e){
113 113
                 $fallback = self::standardizeDriverName($config['fallback']);
114 114
                 if($fallback && $fallback !== $driver){
115 115
                     $class = self::getNamespacePath() . $fallback . '\Driver';
116 116
                     self::$instances[ $instance ] = new $class($config);
117 117
                     self::$instances[ $instance ]->setEventManager(EventManager::getInstance());
118 118
                     trigger_error(sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver, $fallback), E_USER_WARNING);
119
-                }else{
119
+                } else{
120 120
                     throw new phpFastCacheDriverCheckException($e->getMessage(), $e->getCode(), $e);
121 121
                 }
122 122
             }
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             self::$config = array_merge(self::$config, $name);
230 230
         } else if (is_string($name)){
231 231
             self::$config[ $name ] = $value;
232
-        }else{
232
+        } else{
233 233
             throw new phpFastCacheInvalidArgumentException('Invalid variable type: $name');
234 234
         }
235 235
     }
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
@@ -88,13 +88,13 @@
 block discarded – undo
88 88
             if(is_callable($arguments[0])){
89 89
                 if(isset($arguments[1]) && is_string($arguments[0])){
90 90
                     $this->events[$name][$arguments[1]] = $arguments[0];
91
-                }else {
91
+                } else {
92 92
                     $this->events[$name][] = $arguments[0];
93 93
                 }
94
-            }else{
94
+            } else{
95 95
                 throw new phpFastCacheInvalidArgumentException(sprintf('Expected Callable, got "%s"', gettype($arguments[0])));
96 96
             }
97
-        }else{
97
+        } else{
98 98
             throw new \BadMethodCallException('An event must start with "on" such as "onCacheGetItem"');
99 99
         }
100 100
     }
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
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         if($this->driver->getConfig()['itemDetailedDate']){
85 85
             return $this->creationDate;
86
-        }else{
86
+        } else{
87 87
             throw new \LogicException('Cannot access to the creation date when the "itemDetailedDate" configuration is disabled.');
88 88
         }
89 89
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         if($this->driver->getConfig()['itemDetailedDate']){
99 99
             $this->creationDate = $date;
100 100
             return $this;
101
-        }else{
101
+        } else{
102 102
             throw new \LogicException('Cannot access to the creation date when the "itemDetailedDate" configuration is disabled.');
103 103
         }
104 104
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         if($this->driver->getConfig()['itemDetailedDate']){
113 113
             return $this->modificationDate;
114
-        }else{
114
+        } else{
115 115
             throw new \LogicException('Cannot access to the modification date when the "itemDetailedDate" configuration is disabled.');
116 116
         }
117 117
     }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         if($this->driver->getConfig()['itemDetailedDate']){
127 127
             $this->modificationDate = $date;
128 128
             return $this;
129
-        }else{
129
+        } else{
130 130
             throw new \LogicException('Cannot access to the modification date when the "itemDetailedDate" configuration is disabled.');
131 131
         }
132 132
     }
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
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
              * reuse it else set a new Date
137 137
              */
138 138
             $wrap[ self::DRIVER_CDATE_WRAPPER_INDEX ] = $item->getCreationDate() ?: new \DateTime();
139
-        }else{
139
+        } else{
140 140
             $wrap[ self::DRIVER_MDATE_WRAPPER_INDEX ] = null;
141 141
             $wrap[ self::DRIVER_CDATE_WRAPPER_INDEX ] = null;
142 142
         }
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
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
                 return $full_path_tmp;
96 96
             }
97 97
             return $full_path;
98
-        }else{
98
+        } else{
99 99
             if (!isset($this->tmp[ $full_path_hash ]) || (!@file_exists($full_path) || !@is_writable($full_path))) {
100 100
                 if (!@file_exists($full_path)) {
101 101
                     @mkdir($full_path, $this->getDefaultChmod(), true);
102
-                }else if (!@is_writable($full_path)) {
102
+                } else if (!@is_writable($full_path)) {
103 103
                     if (!@chmod($full_path, $this->getDefaultChmod()) && $this->config[ 'autoTmpFallback' ])
104 104
                     {
105 105
                         /**
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
             if(!rename($tmpFilename, $file)){
300 300
                 throw new phpFastCacheIOException(sprintf('Failed to rename %s to %s', $tmpFilename, $file));
301 301
             }
302
-        }else{
302
+        } else{
303 303
             $f = fopen($file, 'w+');
304 304
             $octetWritten = fwrite($f, $data);
305 305
             fclose($f);
Please login to merge, or discard this patch.