Completed
Push — V6 ( 3ff7d1...d91002 )
by Georges
02:25
created
src/phpFastCache/Util/Directory.php 1 patch
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.
src/phpFastCache/Drivers/Ssdb/Driver.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
     {
140 140
         try {
141 141
             $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
142
-              'host' => "127.0.0.1",
143
-              'port' => 8888,
144
-              'password' => '',
145
-              'timeout' => 2000,
142
+                'host' => "127.0.0.1",
143
+                'port' => 8888,
144
+                'password' => '',
145
+                'timeout' => 2000,
146 146
             ];
147 147
 
148 148
             $host = $server[ 'host' ];
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
          * using hardcoded offset of pair key-value :-(
184 184
          */
185 185
         $stat->setInfo(sprintf("Ssdb-server v%s with a total of %s call(s).\n For more information see RawData.", $info[ 2 ], $info[ 6 ]))
186
-          ->setRawData($info)
187
-          ->setData(implode(', ', array_keys($this->itemInstances)))
188
-          ->setSize($this->instance->dbsize());
186
+            ->setRawData($info)
187
+            ->setData(implode(', ', array_keys($this->itemInstances)))
188
+            ->setSize($this->instance->dbsize());
189 189
 
190 190
         return $stat;
191 191
     }
Please login to merge, or discard this patch.
src/phpFastCache/Core/Pool/DriverBaseTrait.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,9 +159,9 @@
 block discarded – undo
159 159
     public function driverPreWrap(ExtendedCacheItemInterface $item)
160 160
     {
161 161
         $wrap = [
162
-          self::DRIVER_DATA_WRAPPER_INDEX => $item->get(),
163
-          self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(),
164
-          self::DRIVER_EDATE_WRAPPER_INDEX => $item->getExpirationDate(),
162
+            self::DRIVER_DATA_WRAPPER_INDEX => $item->get(),
163
+            self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(),
164
+            self::DRIVER_EDATE_WRAPPER_INDEX => $item->getExpirationDate(),
165 165
         ];
166 166
 
167 167
         if($this->config['itemDetailedDate']){
Please login to merge, or discard this patch.
src/phpFastCache/Util/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/autoload.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,6 @@
 block discarded – undo
46 46
 });
47 47
 
48 48
 if ((!defined('PFC_IGNORE_COMPOSER_WARNING') || !PFC_IGNORE_COMPOSER_WARNING) && class_exists('Composer\Autoload\ClassLoader')) {
49
-  trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
49
+    trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
50 50
     E_USER_WARNING);
51 51
 }
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/Core/Pool/IO/IOHelperTrait.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
     protected static function cleanFileName($filename)
203 203
     {
204 204
         $regex = [
205
-          '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/',
206
-          '/\.$/',
207
-          '/^\./',
205
+            '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/',
206
+            '/\.$/',
207
+            '/^\./',
208 208
         ];
209 209
         $replace = ['-', '', ''];
210 210
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             $tmpFilename = Directory::getAbsolutePath(dirname($file) . '/tmp_' . md5(
297 297
                 str_shuffle(uniqid($this->getDriverName(), false))
298 298
                 . str_shuffle(uniqid($this->getDriverName(), false))
299
-              ));
299
+                ));
300 300
 
301 301
             $f = fopen($tmpFilename, 'w+');
302 302
             flock($f, LOCK_EX);
@@ -338,11 +338,11 @@  discard block
 block discarded – undo
338 338
         }
339 339
 
340 340
         $stat->setData(implode(', ', array_keys($this->itemInstances)))
341
-          ->setRawData([
341
+            ->setRawData([
342 342
             'tmp' => $this->tmp
343
-          ])
344
-          ->setSize(Directory::dirSize($path))
345
-          ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
343
+            ])
344
+            ->setSize(Directory::dirSize($path))
345
+            ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path));
346 346
 
347 347
         return $stat;
348 348
     }
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Sqlite/Driver.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
             $PDO = new PDO("sqlite:" . $this->SqliteDir . '/' . self::INDEXING_FILE);
155 155
             $PDO->setAttribute(PDO::ATTR_ERRMODE,
156
-              PDO::ERRMODE_EXCEPTION);
156
+                PDO::ERRMODE_EXCEPTION);
157 157
 
158 158
             if ($createTable == true) {
159 159
                 $this->initIndexing($PDO);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         // look for keyword
189 189
         $stm = $this->indexing->prepare("SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1");
190 190
         $stm->execute([
191
-          ':keyword' => $keyword,
191
+            ':keyword' => $keyword,
192 192
         ]);
193 193
         $row = $stm->fetch(PDO::FETCH_ASSOC);
194 194
         if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
             $db = $this->currentDB;
201 201
             $stm = $this->indexing->prepare("INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)");
202 202
             $stm->execute([
203
-              ':keyword' => $keyword,
204
-              ':db' => $db,
203
+                ':keyword' => $keyword,
204
+                ':db' => $db,
205 205
             ]);
206 206
         }
207 207
 
@@ -272,11 +272,11 @@  discard block
 block discarded – undo
272 272
             if ($toWrite == true) {
273 273
                 try {
274 274
                     $stm = $this->getDb($item->getKey())
275
-                      ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
275
+                        ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
276 276
                     $stm->execute([
277
-                      ':keyword' => $item->getKey(),
278
-                      ':object' => $this->encode($this->driverPreWrap($item)),
279
-                      ':exp' => time() + $item->getTtl(),
277
+                        ':keyword' => $item->getKey(),
278
+                        ':object' => $this->encode($this->driverPreWrap($item)),
279
+                        ':exp' => time() + $item->getTtl(),
280 280
                     ]);
281 281
 
282 282
                     return true;
@@ -284,11 +284,11 @@  discard block
 block discarded – undo
284 284
 
285 285
                     try {
286 286
                         $stm = $this->getDb($item->getKey(), true)
287
-                          ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
287
+                            ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
288 288
                         $stm->execute([
289
-                          ':keyword' => $item->getKey(),
290
-                          ':object' => $this->encode($this->driverPreWrap($item)),
291
-                          ':exp' => time() + $item->getTtl(),
289
+                            ':keyword' => $item->getKey(),
290
+                            ':object' => $this->encode($this->driverPreWrap($item)),
291
+                            ':exp' => time() + $item->getTtl(),
292 292
                         ]);
293 293
                     } catch (PDOException $e) {
294 294
                         return false;
@@ -310,20 +310,20 @@  discard block
 block discarded – undo
310 310
     {
311 311
         try {
312 312
             $stm = $this->getDb($item->getKey())
313
-              ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
313
+                ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
314 314
             $stm->execute([
315
-              ':keyword' => $item->getKey(),
316
-              ':U' => time(),
315
+                ':keyword' => $item->getKey(),
316
+                ':U' => time(),
317 317
             ]);
318 318
             $row = $stm->fetch(PDO::FETCH_ASSOC);
319 319
 
320 320
         } catch (PDOException $e) {
321 321
             try {
322 322
                 $stm = $this->getDb($item->getKey(), true)
323
-                  ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
323
+                    ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U)  LIMIT 1");
324 324
                 $stm->execute([
325
-                  ':keyword' => $item->getKey(),
326
-                  ':U' => time(),
325
+                    ':keyword' => $item->getKey(),
326
+                    ':U' => time(),
327 327
                 ]);
328 328
                 $row = $stm->fetch(PDO::FETCH_ASSOC);
329 329
             } catch (PDOException $e) {
@@ -351,13 +351,13 @@  discard block
 block discarded – undo
351 351
         if ($item instanceof Item) {
352 352
             try {
353 353
                 $stm = $this->getDb($item->getKey())
354
-                  //->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
355
-                  ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
354
+                    //->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
355
+                    ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) ");
356 356
 
357 357
                 return $stm->execute([
358 358
                     // ':id' => $row[ 'id' ],
359
-                  ':keyword' => $item->getKey(),
360
-                  ':U' => time(),
359
+                    ':keyword' => $item->getKey(),
360
+                    ':U' => time(),
361 361
                 ]);
362 362
             } catch (PDOException $e) {
363 363
                 return false;
Please login to merge, or discard this patch.
src/phpFastCache/Helper/Psr16Adapter.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
     {
64 64
         try {
65 65
             $cacheItem = $this->internalCacheInstance
66
-              ->getItem($key)
67
-              ->set($value);
66
+                ->getItem($key)
67
+                ->set($value);
68 68
             if (is_int($ttl) || $ttl instanceof \DateInterval) {
69 69
                 $cacheItem->expiresAfter($ttl);
70 70
             }
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
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $this->driver->setItem($this);
44 44
         } else {
45 45
             throw new phpFastCacheInvalidArgumentException(sprintf('$key must be a string, got type "%s" instead.',
46
-              gettype($key)));
46
+                gettype($key)));
47 47
         }
48 48
     }
49 49
 
Please login to merge, or discard this patch.