Passed
Push — v7 ( 0b13ab...4b7cde )
by Georges
01:44
created
lib/Phpfastcache/Entities/ItemBatch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Entities;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Entities/DriverStatistic.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,10 +135,10 @@
 block discarded – undo
135 135
     public function getPublicDesc(): array
136 136
     {
137 137
         return [
138
-          'Info' => 'Cache Information',
139
-          'Size' => 'Cache Size',
140
-          'Data' => 'Cache items keys',
141
-          'RawData' => 'Cache raw data',
138
+            'Info' => 'Cache Information',
139
+            'Size' => 'Cache Size',
140
+            'Data' => 'Cache items keys',
141
+            'RawData' => 'Cache raw data',
142 142
         ];
143 143
     }
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Entities;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Devtrue/Item.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Devtrue;
17 17
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Drivers\Devtrue\Driver as DevtrueDriver;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23 23
 };
24 24
 
25 25
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Riak/Item.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Riak;
17 17
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Drivers\Riak\Driver as RiakDriver;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23 23
 };
24 24
 
25 25
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Sqlite/Item.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Sqlite;
17 17
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Drivers\Sqlite\Driver as SqliteDriver;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23 23
 };
24 24
 
25 25
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Sqlite/Driver.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Sqlite;
17 17
 
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
             }
128 128
         }
129 129
 
130
-        if (isset($row[ 'object' ])) {
131
-            return $this->decode($row[ 'object' ]);
130
+        if (isset($row['object'])) {
131
+            return $this->decode($row['object']);
132 132
         }
133 133
 
134 134
         return null;
@@ -300,12 +300,12 @@  discard block
 block discarded – undo
300 300
             $stm = $this->indexing->prepare("SELECT MAX(`db`) as `db` FROM `balancing`");
301 301
             $stm->execute();
302 302
             $row = $stm->fetch(PDO::FETCH_ASSOC);
303
-            if (!isset($row[ 'db' ])) {
303
+            if (!isset($row['db'])) {
304 304
                 $db = 1;
305
-            } elseif ($row[ 'db' ] <= 1) {
305
+            } elseif ($row['db'] <= 1) {
306 306
                 $db = 1;
307 307
             } else {
308
-                $db = $row[ 'db' ];
308
+                $db = $row['db'];
309 309
             }
310 310
 
311 311
             // check file size
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
           ':keyword' => $keyword,
328 328
         ]);
329 329
         $row = $stm->fetch(PDO::FETCH_ASSOC);
330
-        if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
331
-            $db = $row[ 'db' ];
330
+        if (isset($row['db']) && $row['db'] != '') {
331
+            $db = $row['db'];
332 332
         } else {
333 333
             /*
334 334
              * Insert new to Indexing
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
         /**
360 360
          * init instant
361 361
          */
362
-        if (!isset($this->instance[ $instant ])) {
362
+        if (!isset($this->instance[$instant])) {
363 363
             // check DB Files ready or not
364 364
             $createTable = false;
365 365
             if (!\file_exists($this->SqliteDir . '/db' . $instant) || $reset == true) {
@@ -372,12 +372,12 @@  discard block
 block discarded – undo
372 372
                 $this->initDB($PDO);
373 373
             }
374 374
 
375
-            $this->instance[ $instant ] = $PDO;
375
+            $this->instance[$instant] = $PDO;
376 376
             unset($PDO);
377 377
 
378 378
         }
379 379
 
380
-        return $this->instance[ $instant ];
380
+        return $this->instance[$instant];
381 381
     }
382 382
 
383 383
     /**
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 use PDOException;
20 20
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface, IO\IOHelperTrait};
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheIOException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheIOException
23 23
 };
24 24
 use Psr\Cache\CacheItemInterface;
25 25
 
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
     {
109 109
         try {
110 110
             $stm = $this->getDb($item->getKey())
111
-              ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
111
+                ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
112 112
             $stm->execute([
113
-              ':keyword' => $item->getKey(),
113
+                ':keyword' => $item->getKey(),
114 114
             ]);
115 115
             $row = $stm->fetch(PDO::FETCH_ASSOC);
116 116
 
117 117
         } catch (PDOException $e) {
118 118
             try {
119 119
                 $stm = $this->getDb($item->getKey(), true)
120
-                  ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
120
+                    ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
121 121
                 $stm->execute([
122
-                  ':keyword' => $item->getKey(),
122
+                    ':keyword' => $item->getKey(),
123 123
                 ]);
124 124
                 $row = $stm->fetch(PDO::FETCH_ASSOC);
125 125
             } catch (PDOException $e) {
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
             if ($toWrite == true) {
163 163
                 try {
164 164
                     $stm = $this->getDb($item->getKey())
165
-                      ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
165
+                        ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
166 166
                     $stm->execute([
167
-                      ':keyword' => $item->getKey(),
168
-                      ':object' => $this->encode($this->driverPreWrap($item)),
169
-                      ':exp' => $item->getExpirationDate()->getTimestamp(),
167
+                        ':keyword' => $item->getKey(),
168
+                        ':object' => $this->encode($this->driverPreWrap($item)),
169
+                        ':exp' => $item->getExpirationDate()->getTimestamp(),
170 170
                     ]);
171 171
 
172 172
                     return true;
@@ -174,11 +174,11 @@  discard block
 block discarded – undo
174 174
 
175 175
                     try {
176 176
                         $stm = $this->getDb($item->getKey(), true)
177
-                          ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
177
+                            ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
178 178
                         $stm->execute([
179
-                          ':keyword' => $item->getKey(),
180
-                          ':object' => $this->encode($this->driverPreWrap($item)),
181
-                          ':exp' => $item->getExpirationDate()->getTimestamp(),
179
+                            ':keyword' => $item->getKey(),
180
+                            ':object' => $this->encode($this->driverPreWrap($item)),
181
+                            ':exp' => $item->getExpirationDate()->getTimestamp(),
182 182
                         ]);
183 183
                     } catch (PDOException $e) {
184 184
                         return false;
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
         if ($item instanceof Item) {
206 206
             try {
207 207
                 $stm = $this->getDb($item->getKey())
208
-                  ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
208
+                    ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
209 209
 
210 210
                 return $stm->execute([
211
-                  ':keyword' => $item->getKey(),
212
-                  ':U' => \time(),
211
+                    ':keyword' => $item->getKey(),
212
+                    ':U' => \time(),
213 213
                 ]);
214 214
             } catch (PDOException $e) {
215 215
                 return false;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
             $PDO = new PDO("sqlite:" . $this->SqliteDir . '/' . self::INDEXING_FILE);
291 291
             $PDO->setAttribute(PDO::ATTR_ERRMODE,
292
-              PDO::ERRMODE_EXCEPTION);
292
+                PDO::ERRMODE_EXCEPTION);
293 293
 
294 294
             if ($createTable == true) {
295 295
                 $this->initIndexing($PDO);
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         // look for keyword
325 325
         $stm = $this->indexing->prepare("SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1");
326 326
         $stm->execute([
327
-          ':keyword' => $keyword,
327
+            ':keyword' => $keyword,
328 328
         ]);
329 329
         $row = $stm->fetch(PDO::FETCH_ASSOC);
330 330
         if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
@@ -336,8 +336,8 @@  discard block
 block discarded – undo
336 336
             $db = $this->currentDB;
337 337
             $stm = $this->indexing->prepare("INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)");
338 338
             $stm->execute([
339
-              ':keyword' => $keyword,
340
-              ':db' => $db,
339
+                ':keyword' => $keyword,
340
+                ':db' => $db,
341 341
             ]);
342 342
         }
343 343
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zenddisk/Item.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @author Lucas Brucksch <[email protected]>
11 11
  *
12 12
  */
13
-declare(strict_types=1);
13
+declare(strict_types = 1);
14 14
 
15 15
 namespace Phpfastcache\Drivers\Zenddisk;
16 16
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
19 19
 use Phpfastcache\Drivers\Zenddisk\Driver as ZendDiskDriver;
20 20
 use Phpfastcache\Exceptions\{
21
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
21
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22 22
 };
23 23
 
24 24
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Redis/Item.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Redis;
17 17
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Drivers\Redis\Driver as RedisDriver;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23 23
 };
24 24
 
25 25
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Wincache/Item.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Wincache;
17 17
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Drivers\Wincache\Driver as WincacheDriver;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23 23
 };
24 24
 
25 25
 /**
Please login to merge, or discard this patch.