@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * Check for Cross-Driver type confusion |
| 85 | 85 | */ |
| 86 | 86 | if ($item instanceof Item) { |
| 87 | - return (bool)$this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item))); |
|
| 87 | + return (bool) $this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item))); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $this->instance->close(); |
| 117 | 117 | $this->instance = null; |
| 118 | 118 | } |
| 119 | - $result = (bool)LeveldbClient::destroy($this->getLeveldbFile()); |
|
| 119 | + $result = (bool) LeveldbClient::destroy($this->getLeveldbFile()); |
|
| 120 | 120 | $this->driverConnect(); |
| 121 | 121 | |
| 122 | 122 | return $result; |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $this->data[] = $data; |
| 283 | 283 | } else { |
| 284 | 284 | if (\is_string($data)) { |
| 285 | - $this->data .= (string)$data; |
|
| 285 | + $this->data .= (string) $data; |
|
| 286 | 286 | } else { |
| 287 | 287 | throw new PhpfastcacheInvalidArgumentException('$data must be either array nor string.'); |
| 288 | 288 | } |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | \array_unshift($this->data, $data); |
| 304 | 304 | } else { |
| 305 | 305 | if (\is_string($data)) { |
| 306 | - $this->data = (string)$data . $this->data; |
|
| 306 | + $this->data = (string) $data . $this->data; |
|
| 307 | 307 | } else { |
| 308 | 308 | throw new PhpfastcacheInvalidArgumentException('$data must be either array nor string.'); |
| 309 | 309 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | * Check for Cross-Driver type confusion |
| 95 | 95 | */ |
| 96 | 96 | if ($item instanceof Item) { |
| 97 | - return (bool)zend_disk_cache_delete($item->getKey()); |
|
| 97 | + return (bool) zend_disk_cache_delete($item->getKey()); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | public function __construct(...$args) |
| 98 | 98 | { |
| 99 | 99 | parent::__construct(...$args); |
| 100 | - $array =& $this->getArray(); |
|
| 100 | + $array = & $this->getArray(); |
|
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * Detect unwanted keys and throw an exception. |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * @var int |
| 30 | 30 | */ |
| 31 | - protected $port = 8091;// SSL: 18091 |
|
| 31 | + protected $port = 8091; // SSL: 18091 |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @var string |
@@ -318,7 +318,7 @@ |
||
| 318 | 318 | $found = false; |
| 319 | 319 | self::$instances = \array_filter( |
| 320 | 320 | \array_map( |
| 321 | - static function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) { |
|
| 321 | + static function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) { |
|
| 322 | 322 | if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) { |
| 323 | 323 | $found = true; |
| 324 | 324 | return null; |
@@ -363,7 +363,7 @@ |
||
| 363 | 363 | public function debugEvents(EventManagerInterface $eventManager) |
| 364 | 364 | { |
| 365 | 365 | $eventManager->onEveryEvents( |
| 366 | - function (string $eventName) { |
|
| 366 | + function(string $eventName) { |
|
| 367 | 367 | $this->printDebugText("Triggered event '{$eventName}'"); |
| 368 | 368 | }, |
| 369 | 369 | 'debugCallback' |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | } |
| 154 | 154 | try { |
| 155 | 155 | return \array_map( |
| 156 | - function (ExtendedCacheItemInterface $item) { |
|
| 156 | + function(ExtendedCacheItemInterface $item) { |
|
| 157 | 157 | return $item->get(); |
| 158 | 158 | }, |
| 159 | 159 | $this->internalCacheInstance->getItems($keys) |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function getStats(): DriverStatistic |
| 60 | 60 | { |
| 61 | - $stats = (array)zend_shm_cache_info(); |
|
| 61 | + $stats = (array) zend_shm_cache_info(); |
|
| 62 | 62 | return (new DriverStatistic()) |
| 63 | 63 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 64 | 64 | ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total'])) |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * Check for Cross-Driver type confusion |
| 125 | 125 | */ |
| 126 | 126 | if ($item instanceof Item) { |
| 127 | - return (bool)zend_shm_cache_delete($item->getKey()); |
|
| 127 | + return (bool) zend_shm_cache_delete($item->getKey()); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |