Completed
Pull Request — final (#542)
by Georges
04:19 queued 02:05
created
src/phpFastCache/Drivers/Xcache/Driver.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,10 +137,10 @@
 block discarded – undo
137 137
             $info = xcache_info(XC_TYPE_VAR, 0);
138 138
 
139 139
             return (new DriverStatistic())
140
-              ->setSize(abs($info[ 'size' ] - $info[ 'avail' ]))
141
-              ->setData(implode(', ', array_keys($this->itemInstances)))
142
-              ->setInfo(sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, str_replace(' ', ', ', XCACHE_MODULES)))
143
-              ->setRawData($info);
140
+                ->setSize(abs($info[ 'size' ] - $info[ 'avail' ]))
141
+                ->setData(implode(', ', array_keys($this->itemInstances)))
142
+                ->setInfo(sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, str_replace(' ', ', ', XCACHE_MODULES)))
143
+                ->setRawData($info);
144 144
         } else {
145 145
             throw new \RuntimeException("PhpFastCache is not able to read Xcache configuration. Please put this to your php.ini:\n
146 146
             [xcache.admin]
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
             $info = xcache_info(XC_TYPE_VAR, 0);
138 138
 
139 139
             return (new DriverStatistic())
140
-              ->setSize(abs($info[ 'size' ] - $info[ 'avail' ]))
140
+              ->setSize(abs($info['size'] - $info['avail']))
141 141
               ->setData(implode(', ', array_keys($this->itemInstances)))
142 142
               ->setInfo(sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, str_replace(' ', ', ', XCACHE_MODULES)))
143 143
               ->setRawData($info);
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Couchdb/Driver.php 3 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     /**
62 62
      * @param \Psr\Cache\CacheItemInterface $item
63
-     * @return mixed
63
+     * @return boolean
64 64
      * @throws phpFastCacheDriverException
65 65
      * @throws phpFastCacheInvalidArgumentException
66 66
      */
@@ -187,6 +187,7 @@  discard block
 block discarded – undo
187 187
     }
188 188
 
189 189
     /**
190
+     * @param string $docId
190 191
      * @return string|null
191 192
      */
192 193
     protected function getLatestDocumentRevision($docId)
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         if ($item instanceof Item) {
73 73
             try {
74 74
                 $this->instance->putDocument(['data' => $this->encode($this->driverPreWrap($item))], $item->getEncodedKey(),
75
-                  $this->getLatestDocumentRevision($item->getEncodedKey()));
75
+                    $this->getLatestDocumentRevision($item->getEncodedKey()));
76 76
             } catch (CouchDBException $e) {
77 77
                 throw new phpFastCacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), null, $e);
78 78
             }
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
             $url .= $path;
175 175
 
176 176
             $this->instance = CouchDBClient::create([
177
-              'dbname' => $this->getDatabaseName(),
178
-              'url' => $url,
179
-              'timeout' => $timeout,
177
+                'dbname' => $this->getDatabaseName(),
178
+                'url' => $url,
179
+                'timeout' => $timeout,
180 180
             ]);
181 181
 
182 182
             $this->createDatabase();
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
         $path = '/' . $this->getDatabaseName() . '/' . urlencode($docId);
194 194
 
195 195
         $response = $this->instance->getHttpClient()->request(
196
-          'HEAD',
197
-          $path,
198
-          null,
199
-          false
196
+            'HEAD',
197
+            $path,
198
+            null,
199
+            false
200 200
         );
201 201
         if (!empty($response->headers[ 'etag' ])) {
202 202
             return trim($response->headers[ 'etag' ], " '\"\t\n\r\0\x0B");
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
         $info = $this->instance->getDatabaseInfo();
251 251
 
252 252
         return (new DriverStatistic())
253
-          ->setSize($info[ 'sizes' ][ 'active' ])
254
-          ->setRawData($info)
255
-          ->setData(implode(', ', array_keys($this->itemInstances)))
256
-          ->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData.");
253
+            ->setSize($info[ 'sizes' ][ 'active' ])
254
+            ->setRawData($info)
255
+            ->setData(implode(', ', array_keys($this->itemInstances)))
256
+            ->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData.");
257 257
     }
258 258
 }
259 259
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
             throw new phpFastCacheDriverException('Got error while trying to get a document: ' . $e->getMessage(), null, $e);
96 96
         }
97 97
 
98
-        if ($response->status === 404 || empty($response->body[ 'data' ])) {
98
+        if ($response->status === 404 || empty($response->body['data'])) {
99 99
             return null;
100 100
         } else if ($response->status === 200) {
101
-            return $this->decode($response->body[ 'data' ]);
101
+            return $this->decode($response->body['data']);
102 102
         } else {
103 103
             throw new phpFastCacheDriverException('Got unexpected HTTP status: ' . $response->status);
104 104
         }
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
         if ($this->instance instanceof CouchdbClient) {
154 154
             throw new phpFastCacheLogicException('Already connected to Couchdb server');
155 155
         } else {
156
-            $host = isset($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1';
157
-            $ssl = isset($this->config[ 'ssl' ]) ? $this->config[ 'ssl' ] : false;
158
-            $port = isset($this->config[ 'port' ]) ? $this->config[ 'port' ] : 5984;
159
-            $path = isset($this->config[ 'path' ]) ? $this->config[ 'path' ] : '/';
160
-            $username = isset($this->config[ 'username' ]) ? $this->config[ 'username' ] : '';
161
-            $password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : '';
162
-            $timeout = isset($this->config[ 'timeout' ]) ? $this->config[ 'timeout' ] : 10;
156
+            $host = isset($this->config['host']) ? $this->config['host'] : '127.0.0.1';
157
+            $ssl = isset($this->config['ssl']) ? $this->config['ssl'] : false;
158
+            $port = isset($this->config['port']) ? $this->config['port'] : 5984;
159
+            $path = isset($this->config['path']) ? $this->config['path'] : '/';
160
+            $username = isset($this->config['username']) ? $this->config['username'] : '';
161
+            $password = isset($this->config['password']) ? $this->config['password'] : '';
162
+            $timeout = isset($this->config['timeout']) ? $this->config['timeout'] : 10;
163 163
 
164 164
             $url = ($ssl ? 'https://' : 'http://');
165 165
             if ($username) {
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
           null,
199 199
           false
200 200
         );
201
-        if (!empty($response->headers[ 'etag' ])) {
202
-            return trim($response->headers[ 'etag' ], " '\"\t\n\r\0\x0B");
201
+        if (!empty($response->headers['etag'])) {
202
+            return trim($response->headers['etag'], " '\"\t\n\r\0\x0B");
203 203
         }
204 204
 
205 205
         return null;
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      */
211 211
     protected function getDatabaseName()
212 212
     {
213
-        return isset($this->config[ 'database' ]) ? $this->config[ 'database' ] : 'phpfastcache';
213
+        return isset($this->config['database']) ? $this->config['database'] : 'phpfastcache';
214 214
     }
215 215
 
216 216
     /**
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         $info = $this->instance->getDatabaseInfo();
251 251
 
252 252
         return (new DriverStatistic())
253
-          ->setSize($info[ 'sizes' ][ 'active' ])
253
+          ->setSize($info['sizes']['active'])
254 254
           ->setRawData($info)
255 255
           ->setData(implode(', ', array_keys($this->itemInstances)))
256 256
           ->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData.");
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Apcu/Driver.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,10 +137,10 @@
 block discarded – undo
137 137
         $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]);
138 138
 
139 139
         return (new DriverStatistic())
140
-          ->setData(implode(', ', array_keys($this->itemInstances)))
141
-          ->setInfo(sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
140
+            ->setData(implode(', ', array_keys($this->itemInstances)))
141
+            ->setInfo(sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
142 142
             $stats[ 'num_entries' ]))
143
-          ->setRawData($stats)
144
-          ->setSize($stats[ 'mem_size' ]);
143
+            ->setRawData($stats)
144
+            ->setSize($stats[ 'mem_size' ]);
145 145
     }
146 146
 }
147 147
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -133,14 +133,14 @@
 block discarded – undo
133 133
      */
134 134
     public function getStats()
135 135
     {
136
-        $stats = (array)apcu_cache_info();
137
-        $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]);
136
+        $stats = (array) apcu_cache_info();
137
+        $date = (new \DateTime())->setTimestamp($stats['start_time']);
138 138
 
139 139
         return (new DriverStatistic())
140 140
           ->setData(implode(', ', array_keys($this->itemInstances)))
141 141
           ->setInfo(sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
142
-            $stats[ 'num_entries' ]))
142
+            $stats['num_entries']))
143 143
           ->setRawData($stats)
144
-          ->setSize($stats[ 'mem_size' ]);
144
+          ->setSize($stats['mem_size']);
145 145
     }
146 146
 }
147 147
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Predis/Driver.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
         $config = isset($this->config[ 'predis' ]) ? $this->config[ 'predis' ] : [];
129 129
 
130 130
         $this->instance = new PredisClient(array_merge([
131
-          'host' => '127.0.0.1',
132
-          'port' => 6379,
133
-          'password' => null,
134
-          'database' => null,
131
+            'host' => '127.0.0.1',
132
+            'port' => 6379,
133
+            'password' => null,
134
+            'database' => null,
135 135
         ], $config));
136 136
 
137 137
         try {
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
         $date = (isset($info[ 'Server' ][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info[ 'Server' ][ 'uptime_in_seconds' ]) : 'unknown date');
175 175
 
176 176
         return (new DriverStatistic())
177
-          ->setData(implode(', ', array_keys($this->itemInstances)))
178
-          ->setRawData($info)
179
-          ->setSize($size)
180
-          ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
177
+            ->setData(implode(', ', array_keys($this->itemInstances)))
178
+            ->setRawData($info)
179
+            ->setSize($size)
180
+            ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
181 181
             $version, $date->format(DATE_RFC2822)));
182 182
     }
183 183
 }
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
              * @see https://redis.io/commands/setex
79 79
              * @see https://redis.io/commands/expire
80 80
              */
81
-            if($ttl <= 0){
81
+            if ($ttl <= 0) {
82 82
                 return $this->instance->expire($item->getKey(), 0);
83
-            }else{
83
+            } else {
84 84
                 return $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)));
85 85
             }
86 86
         } else {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     protected function driverConnect()
135 135
     {
136
-        $config = isset($this->config[ 'predis' ]) ? $this->config[ 'predis' ] : [];
136
+        $config = isset($this->config['predis']) ? $this->config['predis'] : [];
137 137
 
138 138
         $this->instance = new PredisClient(array_merge([
139 139
           'host' => '127.0.0.1',
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
     public function getStats()
178 178
     {
179 179
         $info = $this->instance->info();
180
-        $size = (isset($info[ 'Memory' ][ 'used_memory' ]) ? $info[ 'Memory' ][ 'used_memory' ] : 0);
181
-        $version = (isset($info[ 'Server' ][ 'redis_version' ]) ? $info[ 'Server' ][ 'redis_version' ] : 0);
182
-        $date = (isset($info[ 'Server' ][ 'uptime_in_seconds' ]) ? (new \DateTime())->setTimestamp(time() - $info[ 'Server' ][ 'uptime_in_seconds' ]) : 'unknown date');
180
+        $size = (isset($info['Memory']['used_memory']) ? $info['Memory']['used_memory'] : 0);
181
+        $version = (isset($info['Server']['redis_version']) ? $info['Server']['redis_version'] : 0);
182
+        $date = (isset($info['Server']['uptime_in_seconds']) ? (new \DateTime())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
183 183
 
184 184
         return (new DriverStatistic())
185 185
           ->setData(implode(', ', array_keys($this->itemInstances)))
Please login to merge, or discard this 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($ttl <= 0){
78 78
                 return $this->instance->expire($item->getKey(), 0);
79
-            }else{
79
+            } else{
80 80
                 return $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)));
81 81
             }
82 82
         } else {
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Zenddisk/Driver.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,9 +147,9 @@
 block discarded – undo
147 147
     {
148 148
         $stat = new DriverStatistic();
149 149
         $stat->setInfo('[ZendDisk] A void info string')
150
-          ->setSize(0)
151
-          ->setData(implode(', ', array_keys($this->itemInstances)))
152
-          ->setRawData(false);
150
+            ->setSize(0)
151
+            ->setData(implode(', ', array_keys($this->itemInstances)))
152
+            ->setRawData(false);
153 153
 
154 154
         return $stat;
155 155
     }
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Memcache/Driver.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
         $servers = (!empty($this->config[ 'servers' ]) && is_array($this->config[ 'servers' ]) ? $this->config[ 'servers' ] : []);
134 134
         if (count($servers) < 1) {
135 135
             $servers = [
136
-              [
136
+                [
137 137
                 'host' => '127.0.0.1',
138 138
                 'port' => 11211,
139 139
                 'sasl_user' => false,
140 140
                 'sasl_password' => false,
141
-              ],
141
+                ],
142 142
             ];
143 143
         }
144 144
 
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
         $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]);
176 176
 
177 177
         return (new DriverStatistic())
178
-          ->setData(implode(', ', array_keys($this->itemInstances)))
179
-          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822)))
180
-          ->setRawData($stats)
181
-          ->setSize($stats[ 'bytes' ]);
178
+            ->setData(implode(', ', array_keys($this->itemInstances)))
179
+            ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822)))
180
+            ->setRawData($stats)
181
+            ->setSize($stats[ 'bytes' ]);
182 182
     }
183 183
 }
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         } else {
54 54
             $this->driverConnect();
55 55
 
56
-            if (array_key_exists('compress_data', $config) && $config[ 'compress_data' ] === true) {
56
+            if (array_key_exists('compress_data', $config) && $config['compress_data'] === true) {
57 57
                 $this->memcacheFlags = MEMCACHE_COMPRESSED;
58 58
             }
59 59
         }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     protected function driverConnect()
131 131
     {
132 132
         $this->instance = new MemcacheSoftware();
133
-        $servers = (!empty($this->config[ 'servers' ]) && is_array($this->config[ 'servers' ]) ? $this->config[ 'servers' ] : []);
133
+        $servers = (!empty($this->config['servers']) && is_array($this->config['servers']) ? $this->config['servers'] : []);
134 134
         if (count($servers) < 1) {
135 135
             $servers = [
136 136
               [
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 
145 145
         foreach ($servers as $server) {
146 146
             try {
147
-                if (!$this->instance->addServer($server[ 'host' ], $server[ 'port' ])) {
147
+                if (!$this->instance->addServer($server['host'], $server['port'])) {
148 148
                     $this->fallback = true;
149 149
                 }
150
-                if (!empty($server[ 'sasl_user' ]) && !empty($server[ 'sasl_password' ])) {
151
-                    $this->instance->setSaslAuthData($server[ 'sasl_user' ], $server[ 'sasl_password' ]);
150
+                if (!empty($server['sasl_user']) && !empty($server['sasl_password'])) {
151
+                    $this->instance->setSaslAuthData($server['sasl_user'], $server['sasl_password']);
152 152
                 }
153 153
             } catch (\Exception $e) {
154 154
                 $this->fallback = true;
@@ -167,17 +167,17 @@  discard block
 block discarded – undo
167 167
      */
168 168
     public function getStats()
169 169
     {
170
-        $stats = (array)$this->instance->getstats();
171
-        $stats[ 'uptime' ] = (isset($stats[ 'uptime' ]) ? $stats[ 'uptime' ] : 0);
172
-        $stats[ 'version' ] = (isset($stats[ 'version' ]) ? $stats[ 'version' ] : 'UnknownVersion');
173
-        $stats[ 'bytes' ] = (isset($stats[ 'bytes' ]) ? $stats[ 'version' ] : 0);
170
+        $stats = (array) $this->instance->getstats();
171
+        $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0);
172
+        $stats['version'] = (isset($stats['version']) ? $stats['version'] : 'UnknownVersion');
173
+        $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0);
174 174
 
175
-        $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]);
175
+        $date = (new \DateTime())->setTimestamp(time() - $stats['uptime']);
176 176
 
177 177
         return (new DriverStatistic())
178 178
           ->setData(implode(', ', array_keys($this->itemInstances)))
179
-          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822)))
179
+          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822)))
180 180
           ->setRawData($stats)
181
-          ->setSize($stats[ 'bytes' ]);
181
+          ->setSize($stats['bytes']);
182 182
     }
183 183
 }
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Zendshm/Driver.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,9 +147,9 @@
 block discarded – undo
147 147
     {
148 148
         $stats = (array)zend_shm_cache_info();
149 149
         return (new DriverStatistic())
150
-          ->setData(implode(', ', array_keys($this->itemInstances)))
151
-          ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats[ 'items_total' ]))
152
-          ->setRawData($stats)
153
-          ->setSize($stats[ 'memory_total' ]);
150
+            ->setData(implode(', ', array_keys($this->itemInstances)))
151
+            ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats[ 'items_total' ]))
152
+            ->setRawData($stats)
153
+            ->setSize($stats[ 'memory_total' ]);
154 154
     }
155 155
 }
156 156
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,11 +145,11 @@
 block discarded – undo
145 145
      */
146 146
     public function getStats()
147 147
     {
148
-        $stats = (array)zend_shm_cache_info();
148
+        $stats = (array) zend_shm_cache_info();
149 149
         return (new DriverStatistic())
150 150
           ->setData(implode(', ', array_keys($this->itemInstances)))
151
-          ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats[ 'items_total' ]))
151
+          ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
152 152
           ->setRawData($stats)
153
-          ->setSize($stats[ 'memory_total' ]);
153
+          ->setSize($stats['memory_total']);
154 154
     }
155 155
 }
156 156
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Leveldb/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
             $this->instance->close();
126 126
             $this->instance = null;
127 127
         }
128
-        $result = (bool)LeveldbClient::destroy($this->getLeveldbFile());
128
+        $result = (bool) LeveldbClient::destroy($this->getLeveldbFile());
129 129
         $this->driverConnect();
130 130
 
131 131
         return $result;
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Memstatic/Driver.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,9 +140,9 @@
 block discarded – undo
140 140
     {
141 141
         $stat = new DriverStatistic();
142 142
         $stat->setInfo('[Memstatic] A memory static driver')
143
-          ->setSize(mb_strlen(serialize($this->staticStack)))
144
-          ->setData(implode(', ', array_keys($this->itemInstances)))
145
-          ->setRawData($this->staticStack);
143
+            ->setSize(mb_strlen(serialize($this->staticStack)))
144
+            ->setData(implode(', ', array_keys($this->itemInstances)))
145
+            ->setRawData($this->staticStack);
146 146
 
147 147
         return $stat;
148 148
     }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
          * Check for Cross-Driver type confusion
69 69
          */
70 70
         if ($item instanceof Item) {
71
-            return $this->staticStack[ md5($item->getKey()) ] = $this->driverPreWrap($item);
71
+            return $this->staticStack[md5($item->getKey())] = $this->driverPreWrap($item);
72 72
         } else {
73 73
             throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected');
74 74
         }
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
     protected function driverRead(CacheItemInterface $item)
82 82
     {
83 83
         $key = md5($item->getKey());
84
-        if (isset($this->staticStack[ $key ])) {
85
-            return $this->staticStack[ $key ];
84
+        if (isset($this->staticStack[$key])) {
85
+            return $this->staticStack[$key];
86 86
         }
87 87
         return null;
88 88
     }
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
          */
100 100
         if ($item instanceof Item) {
101 101
             $key = md5($item->getKey());
102
-            if (isset($this->staticStack[ $key ])) {
103
-                unset($this->staticStack[ $key ]);
102
+            if (isset($this->staticStack[$key])) {
103
+                unset($this->staticStack[$key]);
104 104
                 return true;
105 105
             }
106 106
             return false;
Please login to merge, or discard this patch.