@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | return false; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if($this->getConfig()->getOptPrefix()){ |
|
| 84 | + if ($this->getConfig()->getOptPrefix()) { |
|
| 85 | 85 | $this->instance->setOption(RedisClient::OPT_PREFIX, $this->getConfig()->getOptPrefix()); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * Check for Cross-Driver type confusion |
| 150 | 150 | */ |
| 151 | 151 | if ($item instanceof Item) { |
| 152 | - return (bool)$this->instance->del($item->getKey()); |
|
| 152 | + return (bool) $this->instance->del($item->getKey()); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | return (new DriverStatistic()) |
| 182 | 182 | ->setData(\implode(', ', \array_keys($this->itemInstances))) |
| 183 | 183 | ->setRawData($info) |
| 184 | - ->setSize((int)$info['used_memory']) |
|
| 184 | + ->setSize((int) $info['used_memory']) |
|
| 185 | 185 | ->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.", |
| 186 | 186 | $info['redis_version'], $date->format(\DATE_RFC2822))); |
| 187 | 187 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | if ($item instanceof Item) { |
| 64 | 64 | $ttl = $item->getExpirationDate()->getTimestamp() - \time(); |
| 65 | 65 | |
| 66 | - return (bool)apcu_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0)); |
|
| 66 | + return (bool) apcu_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0)); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * Check for Cross-Driver type confusion |
| 95 | 95 | */ |
| 96 | 96 | if ($item instanceof Item) { |
| 97 | - return (bool)apcu_delete($item->getKey()); |
|
| 97 | + return (bool) apcu_delete($item->getKey()); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function getStats(): DriverStatistic |
| 121 | 121 | { |
| 122 | - $stats = (array)apcu_cache_info(); |
|
| 122 | + $stats = (array) apcu_cache_info(); |
|
| 123 | 123 | $date = (new \DateTime())->setTimestamp($stats['start_time']); |
| 124 | 124 | |
| 125 | 125 | return (new DriverStatistic()) |
@@ -127,6 +127,6 @@ discard block |
||
| 127 | 127 | ->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), |
| 128 | 128 | $stats['num_entries'])) |
| 129 | 129 | ->setRawData($stats) |
| 130 | - ->setSize((int)$stats['mem_size']); |
|
| 130 | + ->setSize((int) $stats['mem_size']); |
|
| 131 | 131 | } |
| 132 | 132 | } |