Completed
Push — v7 ( 183c7c...c29e1f )
by Georges
02:11
created
lib/Phpfastcache/Entities/DriverStatistic.php 1 patch
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.
lib/Phpfastcache/Drivers/Devtrue/Item.php 1 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/Devtrue/Driver.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface};
19 19
 use Phpfastcache\Entities\DriverStatistic;
20 20
 use Phpfastcache\Exceptions\{
21
-  phpFastCacheInvalidArgumentException
21
+    phpFastCacheInvalidArgumentException
22 22
 };
23 23
 use Psr\Cache\CacheItemInterface;
24 24
 
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
     protected function driverRead(CacheItemInterface $item): array
65 65
     {
66 66
         return [
67
-          self::DRIVER_DATA_WRAPPER_INDEX => true,
68
-          self::DRIVER_TAGS_WRAPPER_INDEX => [],
69
-          self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(),
67
+            self::DRIVER_DATA_WRAPPER_INDEX => true,
68
+            self::DRIVER_TAGS_WRAPPER_INDEX => [],
69
+            self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(),
70 70
         ];
71 71
     }
72 72
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $stat = new DriverStatistic();
118 118
         $stat->setInfo('[Devtrue] A void info string')
119
-          ->setSize(0)
120
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
121
-          ->setRawData(true);
119
+            ->setSize(0)
120
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
121
+            ->setRawData(true);
122 122
 
123 123
         return $stat;
124 124
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Riak/Item.php 1 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/Riak/Driver.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface};
20 20
 use Phpfastcache\Entities\DriverStatistic;
21 21
 use Phpfastcache\Exceptions\{
22
-  phpFastCacheInvalidArgumentException, phpFastCacheLogicException
22
+    phpFastCacheInvalidArgumentException, phpFastCacheLogicException
23 23
 };
24 24
 use Phpfastcache\Util\ArrayObject;
25 25
 use Psr\Cache\CacheItemInterface;
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
          */
90 90
         if ($item instanceof Item) {
91 91
             $this->instance
92
-              ->bucket($this->bucketName)
93
-              ->newBinary($item->getKey(), $this->encode($this->driverPreWrap($item)))
94
-              ->store();
92
+                ->bucket($this->bucketName)
93
+                ->newBinary($item->getKey(), $this->encode($this->driverPreWrap($item)))
94
+                ->store();
95 95
             return true;
96 96
         }
97 97
 
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
         $info = $this->instance->bucket($this->bucketName)->getProperties();
143 143
 
144 144
         return (new DriverStatistic())
145
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
146
-          ->setRawData($info)
147
-          ->setSize(false)
148
-          ->setInfo('Riak does not provide size/date information att all :(');
145
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
146
+            ->setRawData($info)
147
+            ->setSize(false)
148
+            ->setInfo('Riak does not provide size/date information att all :(');
149 149
     }
150 150
 }
151 151
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Sqlite/Item.php 1 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 1 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 1 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/Zenddisk/Driver.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface};
18 18
 use Phpfastcache\Entities\DriverStatistic;
19 19
 use Phpfastcache\Exceptions\{
20
-  phpFastCacheInvalidArgumentException
20
+    phpFastCacheInvalidArgumentException
21 21
 };
22 22
 use Psr\Cache\CacheItemInterface;
23 23
 
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $stat = new DriverStatistic();
133 133
         $stat->setInfo('[ZendDisk] A void info string')
134
-          ->setSize(0)
135
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
136
-          ->setRawData(false);
134
+            ->setSize(0)
135
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
136
+            ->setRawData(false);
137 137
 
138 138
         return $stat;
139 139
     }
Please login to merge, or discard this patch.