@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function getStats(): DriverStatistic |
| 74 | 74 | { |
| 75 | - $stats = (array)$this->instance->getstats(); |
|
| 75 | + $stats = (array) $this->instance->getstats(); |
|
| 76 | 76 | $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0); |
| 77 | 77 | $stats['version'] = (isset($stats['version']) ? $stats['version'] : 'UnknownVersion'); |
| 78 | 78 | $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 84 | 84 | ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822))) |
| 85 | 85 | ->setRawData($stats) |
| 86 | - ->setSize((int)$stats['bytes']); |
|
| 86 | + ->setSize((int) $stats['bytes']); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 79 | 79 | ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822))) |
| 80 | 80 | ->setRawData($stats) |
| 81 | - ->setSize((int)$stats['bytes']); |
|
| 81 | + ->setSize((int) $stats['bytes']); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | } |
| 147 | 147 | try { |
| 148 | 148 | return \array_map( |
| 149 | - static fn (ExtendedCacheItemInterface $item) => $item->get(), |
|
| 149 | + static fn(ExtendedCacheItemInterface $item) => $item->get(), |
|
| 150 | 150 | $this->internalCacheInstance->getItems($keys) |
| 151 | 151 | ); |
| 152 | 152 | } catch (PhpfastcacheInvalidArgumentException $e) { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public function getItem(string $key): ExtendedCacheItemInterface |
| 55 | 55 | { |
| 56 | 56 | return $this->getStandardizedItem( |
| 57 | - $this->makeOperation(static fn (ExtendedCacheItemPoolInterface $pool) => $pool->getItem($key)) ?? new Item($this, $key), |
|
| 57 | + $this->makeOperation(static fn(ExtendedCacheItemPoolInterface $pool) => $pool->getItem($key)) ?? new Item($this, $key), |
|
| 58 | 58 | $this |
| 59 | 59 | ); |
| 60 | 60 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | public function hasItem(string $key): bool |
| 105 | 105 | { |
| 106 | 106 | return $this->makeOperation( |
| 107 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->hasItem($key) |
|
| 107 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->hasItem($key) |
|
| 108 | 108 | ); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | public function clear(): bool |
| 115 | 115 | { |
| 116 | 116 | return $this->makeOperation( |
| 117 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->clear() |
|
| 117 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->clear() |
|
| 118 | 118 | ); |
| 119 | 119 | } |
| 120 | 120 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | public function deleteItem(string $key): bool |
| 125 | 125 | { |
| 126 | 126 | return $this->makeOperation( |
| 127 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->deleteItem($key) |
|
| 127 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->deleteItem($key) |
|
| 128 | 128 | ); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | public function save(CacheItemInterface $item): bool |
| 135 | 135 | { |
| 136 | 136 | return $this->makeOperation( |
| 137 | - function (ExtendedCacheItemPoolInterface $pool) use ($item) { |
|
| 137 | + function(ExtendedCacheItemPoolInterface $pool) use ($item) { |
|
| 138 | 138 | $item->setHit(true); |
| 139 | 139 | return $pool->save($this->getStandardizedItem($item, $pool)); |
| 140 | 140 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | public function commit(): bool |
| 149 | 149 | { |
| 150 | 150 | return $this->makeOperation( |
| 151 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->commit() |
|
| 151 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->commit() |
|
| 152 | 152 | ); |
| 153 | 153 | } |
| 154 | 154 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | \implode( |
| 200 | 200 | ', ', |
| 201 | 201 | \array_map( |
| 202 | - static fn (ExtendedCacheItemPoolInterface $pool) => \get_class($pool), |
|
| 202 | + static fn(ExtendedCacheItemPoolInterface $pool) => \get_class($pool), |
|
| 203 | 203 | $this->clusterPools |
| 204 | 204 | ) |
| 205 | 205 | ) |
@@ -207,9 +207,9 @@ discard block |
||
| 207 | 207 | ); |
| 208 | 208 | |
| 209 | 209 | $stats->setSize( |
| 210 | - (int)\array_sum( |
|
| 210 | + (int) \array_sum( |
|
| 211 | 211 | \array_map( |
| 212 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getSize(), |
|
| 212 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getSize(), |
|
| 213 | 213 | $this->clusterPools |
| 214 | 214 | ) |
| 215 | 215 | ) |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | \implode( |
| 220 | 220 | ', ', |
| 221 | 221 | \array_map( |
| 222 | - static fn (ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getData(), |
|
| 222 | + static fn(ExtendedCacheItemPoolInterface $pool) => $pool->getStats()->getData(), |
|
| 223 | 223 | $this->clusterPools |
| 224 | 224 | ) |
| 225 | 225 | ) |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function getStats(): DriverStatistic |
| 57 | 57 | { |
| 58 | - $stats = (array)zend_shm_cache_info(); |
|
| 58 | + $stats = (array) zend_shm_cache_info(); |
|
| 59 | 59 | return (new DriverStatistic()) |
| 60 | 60 | ->setData(implode(', ', array_keys($this->itemInstances))) |
| 61 | 61 | ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total'])) |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | $this->assertCacheItemType($item, Item::class); |
| 110 | 110 | |
| 111 | - return (bool)zend_shm_cache_delete($item->getKey()); |
|
| 111 | + return (bool) zend_shm_cache_delete($item->getKey()); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | protected function driverClear(): bool |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | { |
| 110 | 110 | $this->assertCacheItemType($item, Item::class); |
| 111 | 111 | |
| 112 | - return (bool)zend_disk_cache_delete($item->getKey()); |
|
| 112 | + return (bool) zend_disk_cache_delete($item->getKey()); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | /** |
| 98 | 98 | * CouchbaseBucket::get() returns a GetResult interface |
| 99 | 99 | */ |
| 100 | - return $this->decodeDocument((array)$this->getCollection()->get($item->getEncodedKey())->content()); |
|
| 100 | + return $this->decodeDocument((array) $this->getCollection()->get($item->getEncodedKey())->content()); |
|
| 101 | 101 | } catch (DocumentNotFoundException $e) { |
| 102 | 102 | return null; |
| 103 | 103 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | protected string $host = '127.0.0.1'; |
| 25 | 25 | |
| 26 | - protected int $port = 8091;// SSL: 18091 |
|
| 26 | + protected int $port = 8091; // SSL: 18091 |
|
| 27 | 27 | |
| 28 | 28 | protected string $username = ''; |
| 29 | 29 | |