Completed
Push — v5 ( b778e1...e7c877 )
by Georges
02:38
created
src/phpFastCache/Core/DriverAbstract.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 
116 116
 
117 117
     /**
118
-     * @param $file
118
+     * @param string $file
119 119
      * @return string
120 120
      * @throws \Exception
121 121
      */
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -214,9 +214,9 @@
 block discarded – undo
214 214
     public function driverPreWrap(ExtendedCacheItemInterface $item)
215 215
     {
216 216
         return [
217
-          self::DRIVER_DATA_WRAPPER_INDEX => $item->get(),
218
-          self::DRIVER_TIME_WRAPPER_INDEX => $item->getExpirationDate(),
219
-          self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(),
217
+            self::DRIVER_DATA_WRAPPER_INDEX => $item->get(),
218
+            self::DRIVER_TIME_WRAPPER_INDEX => $item->getExpirationDate(),
219
+            self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(),
220 220
         ];
221 221
     }
222 222
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
     public function __destruct()
63 63
     {
64 64
         // clean up the memory and don't want for PHP clean for caching method "phpfastcache"
65
-        if (isset($this->config[ 'instance' ]) && (int) $this->config[ 'cache_method' ] === 3) {
66
-            CacheManager::cleanCachingMethod($this->config[ 'instance' ]);
65
+        if (isset($this->config['instance']) && (int) $this->config['cache_method'] === 3) {
66
+            CacheManager::cleanCachingMethod($this->config['instance']);
67 67
         }
68 68
     }
69 69
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         if (is_array($config_name)) {
110 110
             $this->config = array_merge($this->config, $config_name);
111 111
         } else {
112
-            $this->config[ $config_name ] = $value;
112
+            $this->config[$config_name] = $value;
113 113
         }
114 114
     }
115 115
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     public function driverUnwrapData(array $wrapper)
228 228
     {
229
-        return $wrapper[ self::DRIVER_DATA_WRAPPER_INDEX ];
229
+        return $wrapper[self::DRIVER_DATA_WRAPPER_INDEX];
230 230
     }
231 231
 
232 232
     /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public function driverUnwrapTags(array $wrapper)
237 237
     {
238
-        return $wrapper[ self::DRIVER_TAGS_WRAPPER_INDEX ];
238
+        return $wrapper[self::DRIVER_TAGS_WRAPPER_INDEX];
239 239
     }
240 240
 
241 241
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     public function driverUnwrapTime(array $wrapper)
247 247
     {
248
-        return $wrapper[ self::DRIVER_TIME_WRAPPER_INDEX ];
248
+        return $wrapper[self::DRIVER_TIME_WRAPPER_INDEX];
249 249
     }
250 250
 
251 251
     /**
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         foreach ($tagsItems as $tagsItem) {
300 300
             $data = (array) $tagsItem->get();
301 301
 
302
-            unset($data[ $item->getKey() ]);
302
+            unset($data[$item->getKey()]);
303 303
             $tagsItem->set($data);
304 304
 
305 305
             /**
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Ssdb/Driver.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,10 +147,10 @@
 block discarded – undo
147 147
     {
148 148
         try{
149 149
             $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
150
-              'host' => "127.0.0.1",
151
-              'port' => 8888,
152
-              'password' => '',
153
-              'timeout' => 2000,
150
+                'host' => "127.0.0.1",
151
+                'port' => 8888,
152
+                'password' => '',
153
+                'timeout' => 2000,
154 154
             ];
155 155
 
156 156
             $host = $server[ 'host' ];
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -145,18 +145,18 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function driverConnect()
147 147
     {
148
-        try{
149
-            $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
148
+        try {
149
+            $server = isset($this->config['ssdb']) ? $this->config['ssdb'] : [
150 150
               'host' => "127.0.0.1",
151 151
               'port' => 8888,
152 152
               'password' => '',
153 153
               'timeout' => 2000,
154 154
             ];
155 155
 
156
-            $host = $server[ 'host' ];
157
-            $port = isset($server[ 'port' ]) ? (int) $server[ 'port' ] : 8888;
158
-            $password = isset($server[ 'password' ]) ? $server[ 'password' ] : '';
159
-            $timeout = !empty($server[ 'timeout' ]) ? (int) $server[ 'timeout' ] : 2000;
156
+            $host = $server['host'];
157
+            $port = isset($server['port']) ? (int) $server['port'] : 8888;
158
+            $password = isset($server['password']) ? $server['password'] : '';
159
+            $timeout = !empty($server['timeout']) ? (int) $server['timeout'] : 2000;
160 160
             $this->instance = new SimpleSSDB($host, $port, $timeout);
161 161
             if (!empty($password)) {
162 162
                 $this->instance->auth($password);
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
             } else {
168 168
                 return true;
169 169
             }
170
-        }catch(SSDBException $e){
171
-            throw new phpFastCacheDriverException('Ssdb failed to connect with error: '. $e->getMessage(), 0 , $e);
170
+        } catch (SSDBException $e) {
171
+            throw new phpFastCacheDriverException('Ssdb failed to connect with error: ' . $e->getMessage(), 0, $e);
172 172
         }
173 173
     }
174 174
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
             } else {
168 168
                 return true;
169 169
             }
170
-        }catch(SSDBException $e){
170
+        } catch(SSDBException $e){
171 171
             throw new phpFastCacheDriverException('Ssdb failed to connect with error: '. $e->getMessage(), 0 , $e);
172 172
         }
173 173
     }
Please login to merge, or discard this patch.