@@ -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 | } |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | throw new PhpfastcacheDriverCheckException(\sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
71 | 71 | } |
72 | 72 | |
73 | - try{ |
|
73 | + try { |
|
74 | 74 | $this->driverConnect(); |
75 | - }catch(\Exception $e){ |
|
75 | + } catch (\Exception $e) { |
|
76 | 76 | throw new PhpfastcacheDriverConnectException(\sprintf( |
77 | 77 | self::DRIVER_CONNECT_FAILURE, |
78 | 78 | $this->getDriverName(), |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | protected function decode($value) |
143 | 143 | { |
144 | - return \unserialize((string)$value); |
|
144 | + return \unserialize((string) $value); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | * that has slow performances |
282 | 282 | */ |
283 | 283 | |
284 | - $tagsItem->set(\array_merge((array)$data, [$item->getKey() => $expTimestamp])); |
|
284 | + $tagsItem->set(\array_merge((array) $data, [$item->getKey() => $expTimestamp])); |
|
285 | 285 | |
286 | 286 | /** |
287 | 287 | * Set the expiration date |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | $tagsItems = $this->getItems($this->getTagKeys($item->getRemovedTags())); |
304 | 304 | |
305 | 305 | foreach ($tagsItems as $tagsItem) { |
306 | - $data = (array)$tagsItem->get(); |
|
306 | + $data = (array) $tagsItem->get(); |
|
307 | 307 | |
308 | 308 | unset($data[$item->getKey()]); |
309 | 309 | $tagsItem->set($data); |
@@ -72,7 +72,7 @@ |
||
72 | 72 | |
73 | 73 | try{ |
74 | 74 | $this->driverConnect(); |
75 | - }catch(\Exception $e){ |
|
75 | + } catch(\Exception $e){ |
|
76 | 76 | throw new PhpfastcacheDriverConnectException(\sprintf( |
77 | 77 | self::DRIVER_CONNECT_FAILURE, |
78 | 78 | $this->getDriverName(), |