@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | namespace Phpfastcache\Drivers\Devfalse; |
17 | 17 | |
18 | 18 | use Phpfastcache\Core\Pool\{ |
19 | - DriverBaseTrait, ExtendedCacheItemPoolInterface |
|
19 | + DriverBaseTrait, ExtendedCacheItemPoolInterface |
|
20 | 20 | }; |
21 | 21 | use Phpfastcache\Entities\DriverStatistic; |
22 | 22 | use Phpfastcache\Exceptions\{ |
23 | - PhpfastcacheInvalidArgumentException |
|
23 | + PhpfastcacheInvalidArgumentException |
|
24 | 24 | }; |
25 | 25 | use Psr\Cache\CacheItemInterface; |
26 | 26 | |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | protected function driverRead(CacheItemInterface $item): array |
67 | 67 | { |
68 | 68 | return [ |
69 | - self::DRIVER_DATA_WRAPPER_INDEX => false, |
|
70 | - self::DRIVER_TAGS_WRAPPER_INDEX => [], |
|
71 | - self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(), |
|
69 | + self::DRIVER_DATA_WRAPPER_INDEX => false, |
|
70 | + self::DRIVER_TAGS_WRAPPER_INDEX => [], |
|
71 | + self::DRIVER_EDATE_WRAPPER_INDEX => new \DateTime(), |
|
72 | 72 | ]; |
73 | 73 | } |
74 | 74 | |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | { |
119 | 119 | $stat = new DriverStatistic(); |
120 | 120 | $stat->setInfo('[Devfalse] A void info string') |
121 | - ->setSize(0) |
|
122 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
123 | - ->setRawData(false); |
|
121 | + ->setSize(0) |
|
122 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
123 | + ->setRawData(false); |
|
124 | 124 | |
125 | 125 | return $stat; |
126 | 126 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
21 | 21 | use Phpfastcache\Drivers\Devfalse\Driver as DevfalseDriver; |
22 | 22 | use Phpfastcache\Exceptions\{ |
23 | - PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
23 | + PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
24 | 24 | }; |
25 | 25 | |
26 | 26 | /** |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
20 | 20 | use Phpfastcache\Drivers\Couchbase\Driver as CouchbaseDriver; |
21 | 21 | use Phpfastcache\Exceptions\{ |
22 | - PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
22 | + PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
23 | 23 | }; |
24 | 24 | |
25 | 25 | /** |
@@ -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 | /** |
@@ -18,7 +18,7 @@ discard block |
||
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 | |
@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | { |
130 | 130 | $stat = new DriverStatistic(); |
131 | 131 | $stat->setInfo('[Memstatic] A memory static driver') |
132 | - ->setSize(mb_strlen(\serialize($this->staticStack))) |
|
133 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
134 | - ->setRawData($this->staticStack); |
|
132 | + ->setSize(mb_strlen(\serialize($this->staticStack))) |
|
133 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
134 | + ->setRawData($this->staticStack); |
|
135 | 135 | |
136 | 136 | return $stat; |
137 | 137 | } |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | protected function driverRead(CacheItemInterface $item) |
61 | 61 | { |
62 | 62 | $key = \md5($item->getKey()); |
63 | - if (isset($this->staticStack[ $key ])) { |
|
64 | - return $this->staticStack[ $key ]; |
|
63 | + if (isset($this->staticStack[$key])) { |
|
64 | + return $this->staticStack[$key]; |
|
65 | 65 | } |
66 | 66 | return null; |
67 | 67 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * Check for Cross-Driver type confusion |
78 | 78 | */ |
79 | 79 | if ($item instanceof Item) { |
80 | - $this->staticStack[ \md5($item->getKey()) ] = $this->driverPreWrap($item); |
|
80 | + $this->staticStack[\md5($item->getKey())] = $this->driverPreWrap($item); |
|
81 | 81 | return true; |
82 | 82 | } |
83 | 83 | |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | */ |
97 | 97 | if ($item instanceof Item) { |
98 | 98 | $key = \md5($item->getKey()); |
99 | - if (isset($this->staticStack[ $key ])) { |
|
100 | - unset($this->staticStack[ $key ]); |
|
99 | + if (isset($this->staticStack[$key])) { |
|
100 | + unset($this->staticStack[$key]); |
|
101 | 101 | return true; |
102 | 102 | } |
103 | 103 | return false; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
20 | 20 | use Phpfastcache\Drivers\Memstatic\Driver as MemstaticDriver; |
21 | 21 | use Phpfastcache\Exceptions\{ |
22 | - PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
22 | + PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
23 | 23 | }; |
24 | 24 | |
25 | 25 | /** |
@@ -18,7 +18,7 @@ discard block |
||
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 | |
@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | $info = xcache_info(XC_TYPE_VAR, 0); |
126 | 126 | |
127 | 127 | return (new DriverStatistic()) |
128 | - ->setSize(abs($info[ 'size' ] - $info[ 'avail' ])) |
|
129 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
130 | - ->setInfo(\sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, \str_replace(' ', ', ', XCACHE_MODULES))) |
|
131 | - ->setRawData($info); |
|
128 | + ->setSize(abs($info[ 'size' ] - $info[ 'avail' ])) |
|
129 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
130 | + ->setInfo(\sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, \str_replace(' ', ', ', XCACHE_MODULES))) |
|
131 | + ->setRawData($info); |
|
132 | 132 | } |
133 | 133 | throw new \RuntimeException("PhpFastCache is not able to read Xcache configuration. Please put this to your php.ini:\n |
134 | 134 | [xcache.admin] |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $info = xcache_info(XC_TYPE_VAR, 0); |
126 | 126 | |
127 | 127 | return (new DriverStatistic()) |
128 | - ->setSize(abs($info[ 'size' ] - $info[ 'avail' ])) |
|
128 | + ->setSize(abs($info['size'] - $info['avail'])) |
|
129 | 129 | ->setData(\implode(', ', \array_keys($this->itemInstances))) |
130 | 130 | ->setInfo(\sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, \str_replace(' ', ', ', XCACHE_MODULES))) |
131 | 131 | ->setRawData($info); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
20 | 20 | use Phpfastcache\Drivers\Xcache\Driver as XcacheDriver; |
21 | 21 | use Phpfastcache\Exceptions\{ |
22 | - PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
22 | + PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
23 | 23 | }; |
24 | 24 | |
25 | 25 | /** |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
20 | 20 | use Phpfastcache\Drivers\Predis\Driver as PredisDriver; |
21 | 21 | use Phpfastcache\Exceptions\{ |
22 | - PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
22 | + PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException |
|
23 | 23 | }; |
24 | 24 | |
25 | 25 | /** |