@@ -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 | |
@@ -133,10 +133,10 @@ discard block |
||
133 | 133 | $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]); |
134 | 134 | |
135 | 135 | return (new DriverStatistic()) |
136 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
137 | - ->setInfo(\sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), |
|
136 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
137 | + ->setInfo(\sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), |
|
138 | 138 | $stats[ 'num_entries' ])) |
139 | - ->setRawData($stats) |
|
140 | - ->setSize($stats[ 'mem_size' ]); |
|
139 | + ->setRawData($stats) |
|
140 | + ->setSize($stats[ 'mem_size' ]); |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | \ No newline at end of file |
@@ -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\Apc; |
17 | 17 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | if ($item instanceof Item) { |
88 | 88 | $ttl = $item->getExpirationDate()->getTimestamp() - time(); |
89 | 89 | |
90 | - return (bool)apc_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0)); |
|
90 | + return (bool) apc_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0)); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * Check for Cross-Driver type confusion |
105 | 105 | */ |
106 | 106 | if ($item instanceof Item) { |
107 | - return (bool)apc_delete($item->getKey()); |
|
107 | + return (bool) apc_delete($item->getKey()); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -129,14 +129,14 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function getStats(): DriverStatistic |
131 | 131 | { |
132 | - $stats = (array)apc_cache_info('user'); |
|
133 | - $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]); |
|
132 | + $stats = (array) apc_cache_info('user'); |
|
133 | + $date = (new \DateTime())->setTimestamp($stats['start_time']); |
|
134 | 134 | |
135 | 135 | return (new DriverStatistic()) |
136 | 136 | ->setData(\implode(', ', \array_keys($this->itemInstances))) |
137 | 137 | ->setInfo(\sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), |
138 | - $stats[ 'num_entries' ])) |
|
138 | + $stats['num_entries'])) |
|
139 | 139 | ->setRawData($stats) |
140 | - ->setSize($stats[ 'mem_size' ]); |
|
140 | + ->setSize($stats['mem_size']); |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | \ No newline at end of file |
@@ -20,7 +20,7 @@ |
||
20 | 20 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
21 | 21 | use Phpfastcache\Drivers\Couchdb\Driver as CouchdbDriver; |
22 | 22 | use Phpfastcache\Exceptions\{ |
23 | - phpFastCacheInvalidArgumentException, phpFastCacheInvalidArgumentTypeException |
|
23 | + phpFastCacheInvalidArgumentException, phpFastCacheInvalidArgumentTypeException |
|
24 | 24 | }; |
25 | 25 | |
26 | 26 | /** |
@@ -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\Couchdb; |
17 | 17 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
20 | 20 | use Phpfastcache\Drivers\Files\Driver as FilesDriver; |
21 | 21 | use Phpfastcache\Exceptions\{ |
22 | - phpFastCacheInvalidArgumentException |
|
22 | + phpFastCacheInvalidArgumentException |
|
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\Files; |
17 | 17 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface, IO\IOHelperTrait}; |
19 | 19 | use Phpfastcache\Exceptions\{ |
20 | - phpFastCacheInvalidArgumentException |
|
20 | + phpFastCacheInvalidArgumentException |
|
21 | 21 | }; |
22 | 22 | use Phpfastcache\Util\Directory; |
23 | 23 | use Psr\Cache\CacheItemInterface; |
@@ -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\Files; |
17 | 17 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | protected function driverClear(): bool |
145 | 145 | { |
146 | - return (bool)Directory::rrmdir($this->getPath(true)); |
|
146 | + return (bool) Directory::rrmdir($this->getPath(true)); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -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 | /** |
@@ -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\Couchbase; |
17 | 17 |
@@ -32,10 +32,10 @@ |
||
32 | 32 | * @var array |
33 | 33 | */ |
34 | 34 | protected $buckets = [ |
35 | - [ |
|
35 | + [ |
|
36 | 36 | 'bucket' => 'default', |
37 | 37 | 'password' => '', |
38 | - ], |
|
38 | + ], |
|
39 | 39 | ]; |
40 | 40 | |
41 | 41 | /** |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; |
20 | 20 | use Phpfastcache\Drivers\Apcu\Driver as ApcuDriver; |
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\Apcu; |
17 | 17 |
@@ -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 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]); |
122 | 122 | |
123 | 123 | return (new DriverStatistic()) |
124 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
125 | - ->setInfo(\sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), |
|
124 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
125 | + ->setInfo(\sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), |
|
126 | 126 | $stats[ 'num_entries' ])) |
127 | - ->setRawData($stats) |
|
128 | - ->setSize($stats[ 'mem_size' ]); |
|
127 | + ->setRawData($stats) |
|
128 | + ->setSize($stats[ 'mem_size' ]); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | \ No newline at end of file |
@@ -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\Apcu; |
17 | 17 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if ($item instanceof Item) { |
62 | 62 | $ttl = $item->getExpirationDate()->getTimestamp() - time(); |
63 | 63 | |
64 | - return (bool)apcu_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0)); |
|
64 | + return (bool) apcu_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0)); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * Check for Cross-Driver type confusion |
93 | 93 | */ |
94 | 94 | if ($item instanceof Item) { |
95 | - return (bool)apcu_delete($item->getKey()); |
|
95 | + return (bool) apcu_delete($item->getKey()); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function getStats(): DriverStatistic |
119 | 119 | { |
120 | - $stats = (array)apcu_cache_info(); |
|
121 | - $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]); |
|
120 | + $stats = (array) apcu_cache_info(); |
|
121 | + $date = (new \DateTime())->setTimestamp($stats['start_time']); |
|
122 | 122 | |
123 | 123 | return (new DriverStatistic()) |
124 | 124 | ->setData(\implode(', ', \array_keys($this->itemInstances))) |
125 | 125 | ->setInfo(\sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), |
126 | - $stats[ 'num_entries' ])) |
|
126 | + $stats['num_entries'])) |
|
127 | 127 | ->setRawData($stats) |
128 | - ->setSize($stats[ 'mem_size' ]); |
|
128 | + ->setSize($stats['mem_size']); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | \ No newline at end of file |
@@ -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 | /** |
@@ -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\Devfalse; |
17 | 17 |