Passed
Push — master ( 1e605b...372d62 )
by Georges
01:58
created
lib/Phpfastcache/Drivers/Apcu/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function getStats(): DriverStatistic
50 50
     {
51
-        $stats = (array)apcu_cache_info();
51
+        $stats = (array) apcu_cache_info();
52 52
         $date = (new DateTime())->setTimestamp($stats['start_time']);
53 53
 
54 54
         return (new DriverStatistic())
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 )
62 62
             )
63 63
             ->setRawData($stats)
64
-            ->setSize((int)$stats['mem_size']);
64
+            ->setSize((int) $stats['mem_size']);
65 65
     }
66 66
 
67 67
     /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     protected function driverWrite(ExtendedCacheItemInterface $item): bool
81 81
     {
82 82
 
83
-        return (bool)apcu_store($item->getKey(), $this->driverPreWrap($item), $item->getTtl());
83
+        return (bool) apcu_store($item->getKey(), $this->driverPreWrap($item), $item->getTtl());
84 84
     }
85 85
 
86 86
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function driverDelete(string $key, string $encodedKey): bool
107 107
     {
108
-        return (bool)apcu_delete($key);
108
+        return (bool) apcu_delete($key);
109 109
     }
110 110
 
111 111
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zenddisk/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
     protected function driverDelete(string $key, string $encodedKey): bool
110 110
     {
111 111
 
112
-        return (bool)zend_disk_cache_delete($key);
112
+        return (bool) zend_disk_cache_delete($key);
113 113
     }
114 114
 
115 115
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Leveldb/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     protected function driverWrite(ExtendedCacheItemInterface $item): bool
79 79
     {
80 80
 
81
-        return (bool)$this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item)));
81
+        return (bool) $this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item)));
82 82
     }
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memory/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     protected function driverReadAllKeys(string $pattern = ''): iterable
70 70
     {
71
-        return array_filter(array_keys($this->staticStack), function (string $key) use ($pattern) {
71
+        return array_filter(array_keys($this->staticStack), function(string $key) use ($pattern) {
72 72
             return $pattern
73 73
                 ? preg_match('/' . str_replace('*', '(.*)', $pattern) . '/', $key)
74 74
                 : true;
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Redis/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         return (new DriverStatistic())
57 57
             ->setData(implode(', ', array_keys($this->itemInstances)))
58 58
             ->setRawData($info)
59
-            ->setSize((int)$info['used_memory_dataset'])
59
+            ->setSize((int) $info['used_memory_dataset'])
60 60
             ->setInfo(
61 61
                 sprintf(
62 62
                     "The Redis daemon v%s, php-ext v%s, is up since %s.\n For more information see RawData.",
Please login to merge, or discard this patch.
lib/Phpfastcache/EventManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     /**
118 118
      * @throws PhpfastcacheEventManagerException
119 119
      */
120
-    public function on(array|string $events, callable $callback): void
120
+    public function on(array | string $events, callable $callback): void
121 121
     {
122 122
         if (is_string($events)) {
123 123
             $events = [$events];
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         }
185 185
         $this->itemPoolContext = $pool;
186 186
 
187
-        $this->onEveryEvents(function (string $eventName, ...$args) {
187
+        $this->onEveryEvents(function(string $eventName, ...$args) {
188 188
             EventManager::getInstance()->dispatch($eventName, ...$args);
189 189
         }, 'Scoped' . $pool->getDriverName() . spl_object_hash($this));
190 190
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
             /** @var $item ExtendedCacheItemInterface */
212 212
             $item = new (self::getItemClass())($this, $key, $this->eventManager);
213 213
 
214
-            $getItemDriverRead = function (float $cacheSlamsSpendSeconds = 0) use (&$getItemDriverRead, $item): void {
214
+            $getItemDriverRead = function(float $cacheSlamsSpendSeconds = 0) use (&$getItemDriverRead, $item): void {
215 215
                 $config = $this->getConfig();
216 216
 
217 217
                 $driverArray = $this->driverRead($item);
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/DriverBaseTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         ];
184 184
 
185 185
         if ($this->getConfig()->isItemDetailedDate()) {
186
-            $wrap[ExtendedCacheItemPoolInterface::DRIVER_MDATE_WRAPPER_INDEX] = new DateTime();// Always on the latest date
186
+            $wrap[ExtendedCacheItemPoolInterface::DRIVER_MDATE_WRAPPER_INDEX] = new DateTime(); // Always on the latest date
187 187
             /**
188 188
              * If the creation date exists
189 189
              * reuse it else set a new Date
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         }
196 196
 
197 197
         if ($stringifyDate) {
198
-            \array_walk($wrap, static function (mixed &$value, string $key): void {
198
+            \array_walk($wrap, static function(mixed &$value, string $key): void {
199 199
                 if ($value instanceof DateTimeInterface && $key !== ExtendedCacheItemPoolInterface::DRIVER_DATA_WRAPPER_INDEX) {
200 200
                     $value = $value->format(DateTimeInterface::W3C);
201 201
                 }
Please login to merge, or discard this patch.
lib/Phpfastcache/Event/EventManagerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      * @param string[]|string $events
90 90
      * @param callable $callback
91 91
      */
92
-    public function on(array|string $events, callable $callback): void;
92
+    public function on(array | string $events, callable $callback): void;
93 93
 
94 94
     /**
95 95
      * @param string $eventName
Please login to merge, or discard this patch.