Completed
Push — v5.1 ( 5d1cda...b1a040 )
by Georges
02:45
created
src/phpFastCache/Drivers/Couchbase/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   +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.
src/phpFastCache/Drivers/Devtrue/Driver.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     /**
55 55
      * @param \Psr\Cache\CacheItemInterface $item
56
-     * @return mixed
56
+     * @return boolean
57 57
      * @throws \InvalidArgumentException
58 58
      */
59 59
     public function driverWrite(CacheItemInterface $item)
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     /**
72 72
      * @param $key
73
-     * @return mixed
73
+     * @return boolean
74 74
      */
75 75
     public function driverRead($key)
76 76
     {
Please login to merge, or discard this patch.
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('[Devtrue] A void info string')
143
-          ->setSize(0)
144
-          ->setData(implode(', ', array_keys($this->itemInstances)))
145
-          ->setRawData(true);
143
+            ->setSize(0)
144
+            ->setData(implode(', ', array_keys($this->itemInstances)))
145
+            ->setRawData(true);
146 146
 
147 147
         return $stat;
148 148
     }
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.
Indentation   +25 added lines, -25 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,20 +308,20 @@  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 AND (`exp` >= :U)  LIMIT 1");
311
+                ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
312 312
             $stm->execute([
313
-              ':keyword' => $item->getKey(),
314
-              ':U' => time(),
313
+                ':keyword' => $item->getKey(),
314
+                ':U' => time(),
315 315
             ]);
316 316
             $row = $stm->fetch(PDO::FETCH_ASSOC);
317 317
 
318 318
         } catch (PDOException $e) {
319 319
             try {
320 320
                 $stm = $this->getDb($item->getKey(), true)
321
-                  ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
321
+                    ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
322 322
                 $stm->execute([
323
-                  ':keyword' => $item->getKey(),
324
-                  ':U' => time(),
323
+                    ':keyword' => $item->getKey(),
324
+                    ':U' => time(),
325 325
                 ]);
326 326
                 $row = $stm->fetch(PDO::FETCH_ASSOC);
327 327
             } catch (PDOException $e) {
@@ -359,13 +359,13 @@  discard block
 block discarded – undo
359 359
         if ($item instanceof Item) {
360 360
             try {
361 361
                 $stm = $this->getDb($item->getKey())
362
-                  //->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
363
-                  ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
362
+                    //->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
363
+                    ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
364 364
 
365 365
                 return $stm->execute([
366 366
                     // ':id' => $row[ 'id' ],
367
-                  ':keyword' => $item->getKey(),
368
-                  ':U' => time(),
367
+                    ':keyword' => $item->getKey(),
368
+                    ':U' => time(),
369 369
                 ]);
370 370
             } catch (PDOException $e) {
371 371
                 return false;
@@ -428,9 +428,9 @@  discard block
 block discarded – undo
428 428
         }
429 429
 
430 430
         $stat->setData(implode(', ', array_keys($this->itemInstances)))
431
-          ->setRawData([])
432
-          ->setSize(Directory::dirSize($path))
433
-          ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
431
+            ->setRawData([])
432
+            ->setSize(Directory::dirSize($path))
433
+            ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
434 434
 
435 435
         return $stat;
436 436
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 
17 17
 use PDO;
18 18
 use PDOException;
19
-use phpFastCache\Core\Item\ExtendedCacheItemInterface;
20 19
 use phpFastCache\Core\Pool\DriverBaseTrait;
21 20
 use phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface;
22 21
 use phpFastCache\Core\Pool\IO\PathSeekerTrait;
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.
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/Cookie/Driver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $keyword = self::PREFIX . $item->getKey();
80 80
             $v = json_encode($this->driverPreWrap($item));
81 81
 
82
-            if (isset($this->config[ 'limited_memory_each_object' ]) && strlen($v) > $this->config[ 'limited_memory_each_object' ]) {
82
+            if (isset($this->config['limited_memory_each_object']) && strlen($v) > $this->config['limited_memory_each_object']) {
83 83
                 return false;
84 84
             }
85 85
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         // return null if no caching
101 101
         // return value if in caching
102 102
         $keyword = self::PREFIX . $key;
103
-        $x = isset($_COOKIE[ $keyword ]) ? $this->decode(json_decode($_COOKIE[ $keyword ], true)) : false;
103
+        $x = isset($_COOKIE[$keyword]) ? $this->decode(json_decode($_COOKIE[$keyword], true)) : false;
104 104
 
105 105
         if ($x == false) {
106 106
             return null;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $this->driverConnect();
123 123
         $keyword = self::PREFIX . $key;
124
-        $x = isset($_COOKIE[ $keyword ]) ? $this->decode(json_decode($_COOKIE[ $keyword ])->t) : false;
124
+        $x = isset($_COOKIE[$keyword]) ? $this->decode(json_decode($_COOKIE[$keyword])->t) : false;
125 125
 
126 126
         return $x ? $x - time() : $x;
127 127
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         if ($item instanceof Item) {
140 140
             $this->driverConnect();
141 141
             $keyword = self::PREFIX . $item->getKey();
142
-            $_COOKIE[ $keyword ] = null;
142
+            $_COOKIE[$keyword] = null;
143 143
 
144 144
             return @setcookie($keyword, null, -10);
145 145
         } else {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $this->driverConnect();
157 157
         foreach ($_COOKIE as $keyword => $value) {
158 158
             if (strpos($keyword, self::PREFIX) !== false) {
159
-                $_COOKIE[ $keyword ] = null;
159
+                $_COOKIE[$keyword] = null;
160 160
                 $result = @setcookie($keyword, null, -10);
161 161
                 if ($return !== false) {
162 162
                     $return = $result;
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Leveldb/Driver.php 2 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.
src/phpFastCache/Drivers/Files/Driver.php 3 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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
             /*
76 76
              * Skip if Existing Caching in Options
77 77
              */
78
-            if (isset($option[ 'skipExisting' ]) && $option[ 'skipExisting' ] == true && file_exists($file_path)) {
78
+            if (isset($option['skipExisting']) && $option['skipExisting'] == true && file_exists($file_path)) {
79 79
                 $content = $this->readfile($file_path);
80 80
                 $old = $this->decode($content);
81 81
                 $toWrite = false;
Please login to merge, or discard this patch.
src/phpFastCache/Util/Directory.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
 
84 84
         $files = new RecursiveIteratorIterator
85 85
         (
86
-          new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
87
-          RecursiveIteratorIterator::CHILD_FIRST
86
+            new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
87
+            RecursiveIteratorIterator::CHILD_FIRST
88 88
         );
89 89
         
90 90
         foreach ($files as $fileinfo) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@  discard block
 block discarded – undo
81 81
             return unlink($source);
82 82
         }
83 83
 
84
-        $files = new RecursiveIteratorIterator
85
-        (
84
+        $files = new RecursiveIteratorIterator(
86 85
           new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
87 86
           RecursiveIteratorIterator::CHILD_FIRST
88 87
         );
@@ -95,7 +94,7 @@  discard block
 block discarded – undo
95 94
                 if (self::rrmdir($fileinfo->getRealPath()) === false) {
96 95
                     return false;
97 96
                 }
98
-            } else if(unlink($fileinfo->getRealPath()) === false) {
97
+            } else if (unlink($fileinfo->getRealPath()) === false) {
99 98
                 return false;
100 99
             }
101 100
         }
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Devfalse/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('[Devfalse] A void info string')
143
-          ->setSize(0)
144
-          ->setData(implode(', ', array_keys($this->itemInstances)))
145
-          ->setRawData(false);
143
+            ->setSize(0)
144
+            ->setData(implode(', ', array_keys($this->itemInstances)))
145
+            ->setRawData(false);
146 146
 
147 147
         return $stat;
148 148
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
     /**
59 59
      * @param \Psr\Cache\CacheItemInterface $item
60
-     * @return mixed
60
+     * @return boolean
61 61
      * @throws \InvalidArgumentException
62 62
      */
63 63
     public function driverWrite(CacheItemInterface $item)
Please login to merge, or discard this patch.