Completed
Push — final ( 62e788...78a4d6 )
by Georges
02:53 queued 30s
created
src/phpFastCache/Core/StandardPsr6StructureTrait.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     /**
159 159
      * @param \Psr\Cache\CacheItemInterface $item
160
-     * @return mixed
160
+     * @return boolean
161 161
      * @throws \InvalidArgumentException
162 162
      */
163 163
     public function save(CacheItemInterface $item)
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     }
176 176
 
177 177
     /**
178
-     * @return mixed|null
178
+     * @return boolean
179 179
      * @throws \InvalidArgumentException
180 180
      */
181 181
     public function commit()
Please login to merge, or discard this 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.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 $driverArray = $this->driverRead($item);
58 58
 
59 59
                 if ($driverArray) {
60
-                    if(!is_array($driverArray)){
60
+                    if (!is_array($driverArray)) {
61 61
                         throw new phpFastCacheCoreException(sprintf('The driverRead method returned an unexpected variable type: %s', gettype($driverArray)));
62 62
                     }
63 63
                     $item->set($this->driverUnwrapData($driverArray));
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                         $item->setHit(true);
78 78
                     }
79 79
                 } else {
80
-                    $item->expiresAfter(abs((int) $this->getConfig()[ 'defaultTtl' ]));
80
+                    $item->expiresAfter(abs((int) $this->getConfig()['defaultTtl']));
81 81
                 }
82 82
 
83 83
             }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             throw new \InvalidArgumentException(sprintf('$key must be a string, got type "%s" instead.', gettype($key)));
86 86
         }
87 87
 
88
-        return $this->itemInstances[ $key ];
88
+        return $this->itemInstances[$key];
89 89
     }
90 90
 
91 91
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function setItem(CacheItemInterface $item)
97 97
     {
98 98
         if ($this->getClassNamespace() . '\\Item' === get_class($item)) {
99
-            $this->itemInstances[ $item->getKey() ] = $item;
99
+            $this->itemInstances[$item->getKey()] = $item;
100 100
 
101 101
             return $this;
102 102
         } else {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $collection = [];
115 115
         foreach ($keys as $key) {
116
-            $collection[ $key ] = $this->getItem($key);
116
+            $collection[$key] = $this->getItem($key);
117 117
         }
118 118
 
119 119
         return $collection;
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
          * @var ExtendedCacheItemInterface $item
196 196
          */
197 197
         if (!array_key_exists($item->getKey(), $this->itemInstances)) {
198
-            $this->itemInstances[ $item->getKey() ] = $item;
199
-        } else if(spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
198
+            $this->itemInstances[$item->getKey()] = $item;
199
+        } else if (spl_object_hash($item) !== spl_object_hash($this->itemInstances[$item->getKey()])) {
200 200
             throw new \RuntimeException('Spl object hash mismatches ! You probably tried to save a detached item which has been already retrieved from cache.');
201 201
         }
202 202
 
@@ -219,12 +219,12 @@  discard block
 block discarded – undo
219 219
     public function saveDeferred(CacheItemInterface $item)
220 220
     {
221 221
         if (!array_key_exists($item->getKey(), $this->itemInstances)) {
222
-            $this->itemInstances[ $item->getKey() ] = $item;
223
-        }else if(spl_object_hash($item) !== spl_object_hash($this->itemInstances[ $item->getKey() ])){
222
+            $this->itemInstances[$item->getKey()] = $item;
223
+        } else if (spl_object_hash($item) !== spl_object_hash($this->itemInstances[$item->getKey()])) {
224 224
             throw new \RuntimeException('Spl object hash mismatches ! You probably tried to save a detached item which has been already retrieved from cache.');
225 225
         }
226 226
 
227
-        return $this->deferredList[ $item->getKey() ] = $item;
227
+        return $this->deferredList[$item->getKey()] = $item;
228 228
     }
229 229
 
230 230
     /**
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         foreach ($this->deferredList as $key => $item) {
238 238
             $result = $this->save($item);
239 239
             if ($return !== false) {
240
-                unset($this->deferredList[ $key ]);
240
+                unset($this->deferredList[$key]);
241 241
                 $return = $result;
242 242
             }
243 243
         }
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Couchbase/Driver.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
     }
129 129
 
130 130
     /**
131
-     * @return bool
131
+     * @return boolean|null
132 132
      */
133 133
     public function driverConnect()
134 134
     {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
             $password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : '';
143 143
             $username = isset($this->config[ 'username' ]) ? $this->config[ 'username' ] : '';
144 144
             $buckets = isset($this->config[ 'buckets' ]) ? $this->config[ 'buckets' ] : [
145
-              [
145
+                [
146 146
                 'bucket' => 'default',
147 147
                 'password' => '',
148
-              ],
148
+                ],
149 149
             ];
150 150
 
151 151
             $this->instance = $this->instance ?: new CouchbaseClient("couchbase://{$host}", $username, $password);
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
         $info = $this->getBucket()->manager()->info();
194 194
 
195 195
         return (new driverStatistic())
196
-          ->setSize($info[ 'basicStats' ][ 'diskUsed' ])
197
-          ->setRawData($info)
198
-          ->setData(implode(', ', array_keys($this->itemInstances)))
199
-          ->setInfo('CouchBase version ' . $info[ 'nodes' ][ 0 ][ 'version' ] . ', Uptime (in days): ' . round($info[ 'nodes' ][ 0 ][ 'uptime' ] / 86400, 1) . "\n For more information see RawData.");
196
+            ->setSize($info[ 'basicStats' ][ 'diskUsed' ])
197
+            ->setRawData($info)
198
+            ->setData(implode(', ', array_keys($this->itemInstances)))
199
+            ->setInfo('CouchBase version ' . $info[ 'nodes' ][ 0 ][ 'version' ] . ', Uptime (in days): ' . round($info[ 'nodes' ][ 0 ][ 'uptime' ] / 86400, 1) . "\n For more information see RawData.");
200 200
     }
201 201
 }
202 202
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
         } else {
138 138
 
139 139
 
140
-            $host = isset($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1';
140
+            $host = isset($this->config['host']) ? $this->config['host'] : '127.0.0.1';
141 141
             //$port = isset($server[ 'port' ]) ? $server[ 'port' ] : '11211';
142
-            $password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : '';
143
-            $username = isset($this->config[ 'username' ]) ? $this->config[ 'username' ] : '';
144
-            $buckets = isset($this->config[ 'buckets' ]) ? $this->config[ 'buckets' ] : [
142
+            $password = isset($this->config['password']) ? $this->config['password'] : '';
143
+            $username = isset($this->config['username']) ? $this->config['username'] : '';
144
+            $buckets = isset($this->config['buckets']) ? $this->config['buckets'] : [
145 145
               [
146 146
                 'bucket' => 'default',
147 147
                 'password' => '',
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
             $this->instance = $this->instance ?: new CouchbaseClient("couchbase://{$host}", $username, $password);
152 152
 
153 153
             foreach ($buckets as $bucket) {
154
-                $this->bucketCurrent = $this->bucketCurrent ?: $bucket[ 'bucket' ];
155
-                $this->setBucket($bucket[ 'bucket' ], $this->instance->openBucket($bucket[ 'bucket' ], $bucket[ 'password' ]));
154
+                $this->bucketCurrent = $this->bucketCurrent ?: $bucket['bucket'];
155
+                $this->setBucket($bucket['bucket'], $this->instance->openBucket($bucket['bucket'], $bucket['password']));
156 156
             }
157 157
         }
158 158
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     protected function getBucket()
164 164
     {
165
-        return $this->bucketInstances[ $this->bucketCurrent ];
165
+        return $this->bucketInstances[$this->bucketCurrent];
166 166
     }
167 167
 
168 168
     /**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     protected function setBucket($bucketName, \CouchbaseBucket $CouchbaseBucket)
174 174
     {
175 175
         if (!array_key_exists($bucketName, $this->bucketInstances)) {
176
-            $this->bucketInstances[ $bucketName ] = $CouchbaseBucket;
176
+            $this->bucketInstances[$bucketName] = $CouchbaseBucket;
177 177
         } else {
178 178
             throw new \LogicException('A bucket instance with this name already exists.');
179 179
         }
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
         $info = $this->getBucket()->manager()->info();
194 194
 
195 195
         return (new driverStatistic())
196
-          ->setSize($info[ 'basicStats' ][ 'diskUsed' ])
196
+          ->setSize($info['basicStats']['diskUsed'])
197 197
           ->setRawData($info)
198 198
           ->setData(implode(', ', array_keys($this->itemInstances)))
199
-          ->setInfo('CouchBase version ' . $info[ 'nodes' ][ 0 ][ 'version' ] . ', Uptime (in days): ' . round($info[ 'nodes' ][ 0 ][ 'uptime' ] / 86400, 1) . "\n For more information see RawData.");
199
+          ->setInfo('CouchBase version ' . $info['nodes'][0]['version'] . ', Uptime (in days): ' . round($info['nodes'][0]['uptime'] / 86400, 1) . "\n For more information see RawData.");
200 200
     }
201 201
 }
202 202
\ No newline at end of file
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 namespace phpFastCache\Drivers\Wincache;
16 16
 
17 17
 use phpFastCache\Core\DriverAbstract;
18
-use phpFastCache\Core\StandardPsr6StructureTrait;
19 18
 use phpFastCache\Entities\driverStatistic;
20 19
 use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
21 20
 use phpFastCache\Exceptions\phpFastCacheDriverException;
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Sqlite/Driver.php 4 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     }
212 212
 
213 213
     /**
214
-     * @param $keyword
214
+     * @param string $keyword
215 215
      * @param bool $reset
216 216
      * @return PDO
217 217
      */
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
     /**
250 250
      * @param \Psr\Cache\CacheItemInterface $item
251
-     * @return mixed
251
+     * @return boolean
252 252
      * @throws \InvalidArgumentException
253 253
      */
254 254
     public function driverWrite(CacheItemInterface $item)
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     }
400 400
 
401 401
     /**
402
-     * @return bool
402
+     * @return boolean|null
403 403
      */
404 404
     public function driverConnect()
405 405
     {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -162,12 +162,12 @@  discard block
 block discarded – undo
162 162
             $stm = $this->indexing->prepare("SELECT MAX(`db`) as `db` FROM `balancing`");
163 163
             $stm->execute();
164 164
             $row = $stm->fetch(PDO::FETCH_ASSOC);
165
-            if (!isset($row[ 'db' ])) {
165
+            if (!isset($row['db'])) {
166 166
                 $db = 1;
167
-            } elseif ($row[ 'db' ] <= 1) {
167
+            } elseif ($row['db'] <= 1) {
168 168
                 $db = 1;
169 169
             } else {
170
-                $db = $row[ 'db' ];
170
+                $db = $row['db'];
171 171
             }
172 172
 
173 173
             // check file size
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
           ':keyword' => $keyword,
190 190
         ]);
191 191
         $row = $stm->fetch(PDO::FETCH_ASSOC);
192
-        if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
193
-            $db = $row[ 'db' ];
192
+        if (isset($row['db']) && $row['db'] != '') {
193
+            $db = $row['db'];
194 194
         } else {
195 195
             /*
196 196
              * Insert new to Indexing
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         /**
222 222
          * init instant
223 223
          */
224
-        if (!isset($this->instance[ $instant ])) {
224
+        if (!isset($this->instance[$instant])) {
225 225
             // check DB Files ready or not
226 226
             $createTable = false;
227 227
             if (!file_exists($this->SqliteDir . '/db' . $instant) || $reset == true) {
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
                 $this->initDB($PDO);
235 235
             }
236 236
 
237
-            $this->instance[ $instant ] = $PDO;
237
+            $this->instance[$instant] = $PDO;
238 238
             unset($PDO);
239 239
 
240 240
         }
241 241
 
242
-        return $this->instance[ $instant ];
242
+        return $this->instance[$instant];
243 243
     }
244 244
 
245 245
     /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
          * Check for Cross-Driver type confusion
254 254
          */
255 255
         if ($item instanceof Item) {
256
-            $skipExisting = isset($this->config[ 'skipExisting' ]) ? $this->config[ 'skipExisting' ] : false;
256
+            $skipExisting = isset($this->config['skipExisting']) ? $this->config['skipExisting'] : false;
257 257
             $toWrite = true;
258 258
 
259 259
             // check in cache first
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
             }
330 330
         }
331 331
 
332
-        if (isset($row[ 'object' ])) {
333
-            return $this->decode($row[ 'object' ]);
332
+        if (isset($row['object'])) {
333
+            return $this->decode($row['object']);
334 334
         }
335 335
 
336 336
         return null;
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,10 +16,8 @@
 block discarded – undo
16 16
 
17 17
 use PDO;
18 18
 use PDOException;
19
-use phpFastCache\Cache\ExtendedCacheItemInterface;
20 19
 use phpFastCache\Core\DriverAbstract;
21 20
 use phpFastCache\Core\PathSeekerTrait;
22
-use phpFastCache\Core\StandardPsr6StructureTrait;
23 21
 use phpFastCache\Entities\driverStatistic;
24 22
 use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
25 23
 use phpFastCache\Exceptions\phpFastCacheDriverException;
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
             $PDO = new PDO("sqlite:" . $this->SqliteDir . '/' . self::INDEXING_FILE);
153 153
             $PDO->setAttribute(PDO::ATTR_ERRMODE,
154
-              PDO::ERRMODE_EXCEPTION);
154
+                PDO::ERRMODE_EXCEPTION);
155 155
 
156 156
             if ($createTable == true) {
157 157
                 $this->initIndexing($PDO);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         // look for keyword
187 187
         $stm = $this->indexing->prepare("SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1");
188 188
         $stm->execute([
189
-          ':keyword' => $keyword,
189
+            ':keyword' => $keyword,
190 190
         ]);
191 191
         $row = $stm->fetch(PDO::FETCH_ASSOC);
192 192
         if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
             $db = $this->currentDB;
199 199
             $stm = $this->indexing->prepare("INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)");
200 200
             $stm->execute([
201
-              ':keyword' => $keyword,
202
-              ':db' => $db,
201
+                ':keyword' => $keyword,
202
+                ':db' => $db,
203 203
             ]);
204 204
         }
205 205
 
@@ -270,11 +270,11 @@  discard block
 block discarded – undo
270 270
             if ($toWrite == true) {
271 271
                 try {
272 272
                     $stm = $this->getDb($item->getKey())
273
-                      ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
273
+                        ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
274 274
                     $stm->execute([
275
-                      ':keyword' => $item->getKey(),
276
-                      ':object' => $this->encode($this->driverPreWrap($item)),
277
-                      ':exp' => time() + $item->getTtl(),
275
+                        ':keyword' => $item->getKey(),
276
+                        ':object' => $this->encode($this->driverPreWrap($item)),
277
+                        ':exp' => time() + $item->getTtl(),
278 278
                     ]);
279 279
 
280 280
                     return true;
@@ -282,11 +282,11 @@  discard block
 block discarded – undo
282 282
 
283 283
                     try {
284 284
                         $stm = $this->getDb($item->getKey(), true)
285
-                          ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
285
+                            ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
286 286
                         $stm->execute([
287
-                          ':keyword' => $item->getKey(),
288
-                          ':object' => $this->encode($this->driverPreWrap($item)),
289
-                          ':exp' => time() + $item->getTtl(),
287
+                            ':keyword' => $item->getKey(),
288
+                            ':object' => $this->encode($this->driverPreWrap($item)),
289
+                            ':exp' => time() + $item->getTtl(),
290 290
                         ]);
291 291
                     } catch (PDOException $e) {
292 292
                         return false;
@@ -308,18 +308,18 @@  discard block
 block discarded – undo
308 308
     {
309 309
         try {
310 310
             $stm = $this->getDb($item->getKey())
311
-              ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
311
+                ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
312 312
             $stm->execute([
313
-              ':keyword' => $item->getKey(),
313
+                ':keyword' => $item->getKey(),
314 314
             ]);
315 315
             $row = $stm->fetch(PDO::FETCH_ASSOC);
316 316
 
317 317
         } catch (PDOException $e) {
318 318
             try {
319 319
                 $stm = $this->getDb($item->getKey(), true)
320
-                  ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
320
+                    ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
321 321
                 $stm->execute([
322
-                  ':keyword' => $item->getKey(),
322
+                    ':keyword' => $item->getKey(),
323 323
                 ]);
324 324
                 $row = $stm->fetch(PDO::FETCH_ASSOC);
325 325
             } catch (PDOException $e) {
@@ -347,11 +347,11 @@  discard block
 block discarded – undo
347 347
         if ($item instanceof Item) {
348 348
             try {
349 349
                 $stm = $this->getDb($item->getKey())
350
-                  ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
350
+                    ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
351 351
 
352 352
                 return $stm->execute([
353
-                  ':keyword' => $item->getKey(),
354
-                  ':U' => time(),
353
+                    ':keyword' => $item->getKey(),
354
+                    ':U' => time(),
355 355
                 ]);
356 356
             } catch (PDOException $e) {
357 357
                 return false;
@@ -414,9 +414,9 @@  discard block
 block discarded – undo
414 414
         }
415 415
 
416 416
         $stat->setData(implode(', ', array_keys($this->itemInstances)))
417
-          ->setRawData([])
418
-          ->setSize(Directory::dirSize($path))
419
-          ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
417
+            ->setRawData([])
418
+            ->setSize(Directory::dirSize($path))
419
+            ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
420 420
 
421 421
         return $stat;
422 422
     }
Please login to merge, or discard this patch.
src/phpFastCache/Core/MemcacheDriverCollisionDetectorTrait.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
                 return true;
28 28
             } else if (constant($CONSTANT_NAME) !== $driverName) {
29 29
                 trigger_error('Memcache collision detected, you used both Memcache and Memcached driver in your script, this may leads to unexpected behaviours',
30
-                  E_USER_WARNING);
30
+                    E_USER_WARNING);
31 31
 
32 32
                 return false;
33 33
             }
Please login to merge, or discard this patch.
src/phpFastCache/Cache/ItemBaseTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     public function removeTag($tagName)
350 350
     {
351 351
         if (($key = array_search($tagName, $this->tags)) !== false) {
352
-            unset($this->tags[ $key ]);
352
+            unset($this->tags[$key]);
353 353
             $this->removedTags[] = $tagName;
354 354
         }
355 355
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
     final public function __debugInfo()
393 393
     {
394 394
         $info = get_object_vars($this);
395
-        $info[ 'driver' ] = 'object(' . get_class($info[ 'driver' ]) . ')';
395
+        $info['driver'] = 'object(' . get_class($info['driver']) . ')';
396 396
 
397 397
         return (array) $info;
398 398
     }
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Cookie/Item.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             $this->driver->setItem($this);
43 43
         } else {
44 44
             throw new \InvalidArgumentException(sprintf('$key must be a string, got type "%s" instead.',
45
-              gettype($key)));
45
+                gettype($key)));
46 46
         }
47 47
     }
48 48
 
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Leveldb/Driver.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
     }
129 129
 
130 130
     /**
131
-     * @return bool
131
+     * @return boolean|null
132 132
      */
133 133
     public function driverConnect()
134 134
     {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -176,9 +176,9 @@
 block discarded – undo
176 176
     public function getStats()
177 177
     {
178 178
         return (new driverStatistic())
179
-          ->setData(implode(', ', array_keys($this->itemInstances)))
180
-          ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($this->getLeveldbFile()))
181
-          ->setSize(Directory::dirSize($this->getLeveldbFile()));
179
+            ->setData(implode(', ', array_keys($this->itemInstances)))
180
+            ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($this->getLeveldbFile()))
181
+            ->setSize(Directory::dirSize($this->getLeveldbFile()));
182 182
     }
183 183
 
184 184
     /**
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 namespace phpFastCache\Drivers\Wincache;
16 16
 
17 17
 use phpFastCache\Core\DriverAbstract;
18
-use phpFastCache\Core\StandardPsr6StructureTrait;
19 18
 use phpFastCache\Entities\driverStatistic;
20 19
 use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
21 20
 use phpFastCache\Exceptions\phpFastCacheDriverException;
Please login to merge, or discard this patch.
src/phpFastCache/Cache/DriverBaseTrait.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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         if (is_array($config_name)) {
61 61
             $this->config = array_merge($this->config, $config_name);
62 62
         } else {
63
-            $this->config[ $config_name ] = $value;
63
+            $this->config[$config_name] = $value;
64 64
         }
65 65
     }
66 66
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function driverUnwrapData(array $wrapper)
181 181
     {
182
-        return $wrapper[ self::DRIVER_DATA_WRAPPER_INDEX ];
182
+        return $wrapper[self::DRIVER_DATA_WRAPPER_INDEX];
183 183
     }
184 184
 
185 185
     /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public function driverUnwrapTags(array $wrapper)
190 190
     {
191
-        return $wrapper[ self::DRIVER_TAGS_WRAPPER_INDEX ];
191
+        return $wrapper[self::DRIVER_TAGS_WRAPPER_INDEX];
192 192
     }
193 193
 
194 194
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function driverUnwrapTime(array $wrapper)
200 200
     {
201
-        return $wrapper[ self::DRIVER_TIME_WRAPPER_INDEX ];
201
+        return $wrapper[self::DRIVER_TIME_WRAPPER_INDEX];
202 202
     }
203 203
 
204 204
     /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
          * on tags item, it can leads
224 224
          * to an infinite recursive calls
225 225
          */
226
-        if(strpos($item->getKey(), self::DRIVER_TAGS_KEY_PREFIX ) === 0){
226
+        if (strpos($item->getKey(), self::DRIVER_TAGS_KEY_PREFIX) === 0) {
227 227
             throw new \LogicException('Trying to set tag(s) to an Tag item index: ' . $item->getKey());
228 228
         }
229 229
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         foreach ($tagsItems as $tagsItem) {
267 267
             $data = (array) $tagsItem->get();
268 268
 
269
-            unset($data[ $item->getKey() ]);
269
+            unset($data[$item->getKey()]);
270 270
             $tagsItem->set($data);
271 271
 
272 272
             /**
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Files/Driver.php 4 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     /**
57 57
      * @param \Psr\Cache\CacheItemInterface $item
58
-     * @return mixed
58
+     * @return boolean|null
59 59
      * @throws \InvalidArgumentException
60 60
      */
61 61
     public function driverWrite(CacheItemInterface $item)
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     /**
212 212
      * @param string $optionName
213 213
      * @param mixed $optionValue
214
-     * @return bool
214
+     * @return boolean|null
215 215
      * @throws \InvalidArgumentException
216 216
      */
217 217
     public static function isValidOption($optionName, $optionValue)
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         }
240 240
     }
241 241
     /**
242
-     * @return array
242
+     * @return string[]
243 243
      */
244 244
     public static function getValidOptions()
245 245
     {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     }
248 248
 
249 249
     /**
250
-     * @return array
250
+     * @return string[]
251 251
      */
252 252
     public static function getRequiredOptions()
253 253
     {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -254,9 +254,9 @@
 block discarded – undo
254 254
         }
255 255
 
256 256
         $stat->setData(implode(', ', array_keys($this->itemInstances)))
257
-          ->setRawData([])
258
-          ->setSize(Directory::dirSize($path))
259
-          ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
257
+            ->setRawData([])
258
+            ->setSize(Directory::dirSize($path))
259
+            ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
260 260
 
261 261
         return $stat;
262 262
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 namespace phpFastCache\Drivers\Wincache;
16 16
 
17 17
 use phpFastCache\Core\DriverAbstract;
18
-use phpFastCache\Core\StandardPsr6StructureTrait;
19 18
 use phpFastCache\Entities\driverStatistic;
20 19
 use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
21 20
 use phpFastCache\Exceptions\phpFastCacheDriverException;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             /**
78 78
              * Skip if Existing Caching in Options
79 79
              */
80
-            if (isset($this->config[ 'skipExisting' ]) && $this->config[ 'skipExisting' ] == true && file_exists($file_path)) {
80
+            if (isset($this->config['skipExisting']) && $this->config['skipExisting'] == true && file_exists($file_path)) {
81 81
                 $content = $this->readfile($file_path);
82 82
                 $old = $this->decode($content);
83 83
                 $toWrite = false;
Please login to merge, or discard this patch.