@@ -11,7 +11,7 @@ |
||
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 |
@@ -135,10 +135,10 @@ |
||
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 |
@@ -11,7 +11,7 @@ |
||
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 |
@@ -11,7 +11,7 @@ |
||
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 |
@@ -19,7 +19,7 @@ |
||
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 | /** |
@@ -11,7 +11,7 @@ |
||
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 |
@@ -19,7 +19,7 @@ |
||
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 | /** |
@@ -11,7 +11,7 @@ |
||
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 |
@@ -19,7 +19,7 @@ |
||
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 | /** |
@@ -11,7 +11,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | /** |
@@ -19,7 +19,7 @@ discard block |
||
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 |
||
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) { |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | if ($item instanceof Item) { |
148 | 148 | try { |
149 | 149 | $stm = $this->getDb($item->getKey()) |
150 | - ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)"); |
|
150 | + ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)"); |
|
151 | 151 | $stm->execute([ |
152 | - ':keyword' => $item->getKey(), |
|
153 | - ':object' => $this->encode($this->driverPreWrap($item)), |
|
154 | - ':exp' => $item->getExpirationDate()->getTimestamp(), |
|
152 | + ':keyword' => $item->getKey(), |
|
153 | + ':object' => $this->encode($this->driverPreWrap($item)), |
|
154 | + ':exp' => $item->getExpirationDate()->getTimestamp(), |
|
155 | 155 | ]); |
156 | 156 | |
157 | 157 | return true; |
@@ -176,11 +176,11 @@ discard block |
||
176 | 176 | if ($item instanceof Item) { |
177 | 177 | try { |
178 | 178 | $stm = $this->getDb($item->getKey()) |
179 | - ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) "); |
|
179 | + ->prepare("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) "); |
|
180 | 180 | |
181 | 181 | return $stm->execute([ |
182 | - ':keyword' => $item->getKey(), |
|
183 | - ':U' => \time(), |
|
182 | + ':keyword' => $item->getKey(), |
|
183 | + ':U' => \time(), |
|
184 | 184 | ]); |
185 | 185 | } catch (PDOException $e) { |
186 | 186 | return false; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $PDO = new PDO("sqlite:" . $this->SqliteDir . '/' . self::INDEXING_FILE); |
262 | 262 | $PDO->setAttribute(PDO::ATTR_ERRMODE, |
263 | - PDO::ERRMODE_EXCEPTION); |
|
263 | + PDO::ERRMODE_EXCEPTION); |
|
264 | 264 | |
265 | 265 | if ($createTable == true) { |
266 | 266 | $this->initIndexing($PDO); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | // look for keyword |
296 | 296 | $stm = $this->indexing->prepare("SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1"); |
297 | 297 | $stm->execute([ |
298 | - ':keyword' => $keyword, |
|
298 | + ':keyword' => $keyword, |
|
299 | 299 | ]); |
300 | 300 | $row = $stm->fetch(PDO::FETCH_ASSOC); |
301 | 301 | if (isset($row[ 'db' ]) && $row[ 'db' ] != '') { |
@@ -307,8 +307,8 @@ discard block |
||
307 | 307 | $db = $this->currentDB; |
308 | 308 | $stm = $this->indexing->prepare("INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)"); |
309 | 309 | $stm->execute([ |
310 | - ':keyword' => $keyword, |
|
311 | - ':db' => $db, |
|
310 | + ':keyword' => $keyword, |
|
311 | + ':db' => $db, |
|
312 | 312 | ]); |
313 | 313 | } |
314 | 314 |
@@ -10,7 +10,7 @@ |
||
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 |
@@ -18,7 +18,7 @@ |
||
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 | /** |
@@ -11,7 +11,7 @@ |
||
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 |
@@ -19,7 +19,7 @@ |
||
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 | /** |
@@ -11,7 +11,7 @@ |
||
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 |
@@ -19,7 +19,7 @@ |
||
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 | /** |