@@ -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\Exceptions; |
| 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\Exceptions; |
| 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\Exceptions; |
| 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\Exceptions; |
| 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\Exceptions; |
| 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\Helper; |
| 17 | 17 | |
@@ -221,11 +221,11 @@ discard block |
||
| 221 | 221 | $this->printSkipText('A driver could not be initialized due to missing requirement: ' . $exception->getMessage()); |
| 222 | 222 | } else { |
| 223 | 223 | $this->printFailText(\sprintf( |
| 224 | - 'Uncaught exception "%s" in "%s" line %d with message: "%s"', |
|
| 225 | - \get_class($exception), |
|
| 226 | - $exception->getFile(), |
|
| 227 | - $exception->getLine(), |
|
| 228 | - $exception->getMessage() |
|
| 224 | + 'Uncaught exception "%s" in "%s" line %d with message: "%s"', |
|
| 225 | + \get_class($exception), |
|
| 226 | + $exception->getFile(), |
|
| 227 | + $exception->getLine(), |
|
| 228 | + $exception->getMessage() |
|
| 229 | 229 | )); |
| 230 | 230 | } |
| 231 | 231 | $this->terminateTest(); |
@@ -272,17 +272,17 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | if ($errorType === '[FATAL ERROR]') { |
| 274 | 274 | $this->printFailText(\sprintf( |
| 275 | - "A critical error has been caught: \"%s\" in %s line %d", |
|
| 276 | - "$errorType $errstr", |
|
| 277 | - $errfile, |
|
| 278 | - $errline |
|
| 275 | + "A critical error has been caught: \"%s\" in %s line %d", |
|
| 276 | + "$errorType $errstr", |
|
| 277 | + $errfile, |
|
| 278 | + $errline |
|
| 279 | 279 | )); |
| 280 | 280 | } else { |
| 281 | 281 | $this->printDebugText(\sprintf( |
| 282 | - "A non-critical error has been caught: \"%s\" in %s line %d", |
|
| 283 | - "$errorType $errstr", |
|
| 284 | - $errfile, |
|
| 285 | - $errline |
|
| 282 | + "A non-critical error has been caught: \"%s\" in %s line %d", |
|
| 283 | + "$errorType $errstr", |
|
| 284 | + $errfile, |
|
| 285 | + $errline |
|
| 286 | 286 | )); |
| 287 | 287 | } |
| 288 | 288 | } |
@@ -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\Exceptions; |
| 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,9 +121,9 @@ discard block |
||
| 121 | 121 | $date = (new \DateTime())->setTimestamp(\time() - $info[ 'total_cache_uptime' ]); |
| 122 | 122 | |
| 123 | 123 | return (new DriverStatistic()) |
| 124 | - ->setInfo(\sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822))) |
|
| 125 | - ->setSize($memInfo[ 'memory_free' ] - $memInfo[ 'memory_total' ]) |
|
| 126 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
| 127 | - ->setRawData($memInfo); |
|
| 124 | + ->setInfo(\sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822))) |
|
| 125 | + ->setSize($memInfo[ 'memory_free' ] - $memInfo[ 'memory_total' ]) |
|
| 126 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
| 127 | + ->setRawData($memInfo); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | \ 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\Wincache; |
| 17 | 17 | |
@@ -118,11 +118,11 @@ discard block |
||
| 118 | 118 | { |
| 119 | 119 | $memInfo = wincache_ucache_meminfo(); |
| 120 | 120 | $info = wincache_ucache_info(); |
| 121 | - $date = (new \DateTime())->setTimestamp(\time() - $info[ 'total_cache_uptime' ]); |
|
| 121 | + $date = (new \DateTime())->setTimestamp(\time() - $info['total_cache_uptime']); |
|
| 122 | 122 | |
| 123 | 123 | return (new DriverStatistic()) |
| 124 | 124 | ->setInfo(\sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822))) |
| 125 | - ->setSize($memInfo[ 'memory_free' ] - $memInfo[ 'memory_total' ]) |
|
| 125 | + ->setSize($memInfo['memory_free'] - $memInfo['memory_total']) |
|
| 126 | 126 | ->setData(\implode(', ', \array_keys($this->itemInstances))) |
| 127 | 127 | ->setRawData($memInfo); |
| 128 | 128 | } |
@@ -17,11 +17,11 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | use Phpfastcache\Config\ConfigurationOption; |
| 19 | 19 | use Phpfastcache\Core\Pool\{ |
| 20 | - DriverBaseTrait, ExtendedCacheItemPoolInterface |
|
| 20 | + DriverBaseTrait, ExtendedCacheItemPoolInterface |
|
| 21 | 21 | }; |
| 22 | 22 | use Phpfastcache\Entities\DriverStatistic; |
| 23 | 23 | use Phpfastcache\Exceptions\{ |
| 24 | - PhpfastcacheInvalidArgumentException, PhpfastcacheLogicException |
|
| 24 | + PhpfastcacheInvalidArgumentException, PhpfastcacheLogicException |
|
| 25 | 25 | }; |
| 26 | 26 | use Phpfastcache\Util\ArrayObject; |
| 27 | 27 | use Psr\Cache\CacheItemInterface; |
@@ -162,10 +162,10 @@ discard block |
||
| 162 | 162 | $date = (new \DateTime())->setTimestamp(\time() - $info[ 'uptime_in_seconds' ]); |
| 163 | 163 | |
| 164 | 164 | return (new DriverStatistic()) |
| 165 | - ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
| 166 | - ->setRawData($info) |
|
| 167 | - ->setSize((int)$info[ 'used_memory' ]) |
|
| 168 | - ->setInfo(\sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
|
| 165 | + ->setData(\implode(', ', \array_keys($this->itemInstances))) |
|
| 166 | + ->setRawData($info) |
|
| 167 | + ->setSize((int)$info[ 'used_memory' ]) |
|
| 168 | + ->setInfo(\sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
|
| 169 | 169 | $info[ 'redis_version' ], $date->format(DATE_RFC2822))); |
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | \ 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\Redis; |
| 17 | 17 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * Check for Cross-Driver type confusion |
| 135 | 135 | */ |
| 136 | 136 | if ($item instanceof Item) { |
| 137 | - return (bool)$this->instance->del($item->getKey()); |
|
| 137 | + return (bool) $this->instance->del($item->getKey()); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -161,13 +161,13 @@ discard block |
||
| 161 | 161 | { |
| 162 | 162 | // used_memory |
| 163 | 163 | $info = $this->instance->info(); |
| 164 | - $date = (new \DateTime())->setTimestamp(\time() - $info[ 'uptime_in_seconds' ]); |
|
| 164 | + $date = (new \DateTime())->setTimestamp(\time() - $info['uptime_in_seconds']); |
|
| 165 | 165 | |
| 166 | 166 | return (new DriverStatistic()) |
| 167 | 167 | ->setData(\implode(', ', \array_keys($this->itemInstances))) |
| 168 | 168 | ->setRawData($info) |
| 169 | - ->setSize((int)$info[ 'used_memory' ]) |
|
| 169 | + ->setSize((int) $info['used_memory']) |
|
| 170 | 170 | ->setInfo(\sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
| 171 | - $info[ 'redis_version' ], $date->format(DATE_RFC2822))); |
|
| 171 | + $info['redis_version'], $date->format(DATE_RFC2822))); |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | \ No newline at end of file |