Passed
Push — master ( 50ea4d...f73787 )
by Georges
12:15 queued 13s
created
lib/Phpfastcache/Drivers/Ssdb/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $this->assertCacheItemType($item, Item::class);
112 112
 
113
-        return (bool)$this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl());
113
+        return (bool) $this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl());
114 114
     }
115 115
 
116 116
     /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $this->assertCacheItemType($item, Item::class);
124 124
 
125
-        return (bool)$this->instance->del($item->getEncodedKey());
125
+        return (bool) $this->instance->del($item->getEncodedKey());
126 126
     }
127 127
 
128 128
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Couchbasev3/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
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) {
102 102
             return null;
103 103
         }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Apcu/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function getStats(): DriverStatistic
49 49
     {
50
-        $stats = (array)apcu_cache_info();
50
+        $stats = (array) apcu_cache_info();
51 51
         $date = (new DateTime())->setTimestamp($stats['start_time']);
52 52
 
53 53
         return (new DriverStatistic())
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 )
61 61
             )
62 62
             ->setRawData($stats)
63
-            ->setSize((int)$stats['mem_size']);
63
+            ->setSize((int) $stats['mem_size']);
64 64
     }
65 65
 
66 66
     /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $this->assertCacheItemType($item, Item::class);
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
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $this->assertCacheItemType($item, Item::class);
109 109
 
110
-        return (bool)apcu_delete($item->getKey());
110
+        return (bool) apcu_delete($item->getKey());
111 111
     }
112 112
 
113 113
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/ExtendedCacheItemTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     /**
246 246
      * @throws PhpfastcacheInvalidTypeException
247 247
      */
248
-    public function append(array|string $data): ExtendedCacheItemInterface
248
+    public function append(array | string $data): ExtendedCacheItemInterface
249 249
     {
250 250
         if ($this->data !== null && !\is_string($this->data) && !\is_array($this->data)) {
251 251
             throw new PhpfastcacheInvalidTypeException(\sprintf('Cannot append on a "%s" type.', \gettype($this->data)));
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     /**
264 264
      * @throws PhpfastcacheInvalidTypeException
265 265
      */
266
-    public function prepend(array|string $data): ExtendedCacheItemInterface
266
+    public function prepend(array | string $data): ExtendedCacheItemInterface
267 267
     {
268 268
         if ($this->data !== null && !\is_string($this->data) && !\is_array($this->data)) {
269 269
             throw new PhpfastcacheInvalidTypeException(\sprintf('Cannot prepend on a "%s" type.', \gettype($this->data)));
Please login to merge, or discard this patch.
lib/Phpfastcache/Util/Directory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
         /**
141 141
          * Allows dereferencing char
142 142
          */
143
-        $file = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__);// remove file protocols such as "phar://" etc.
143
+        $file = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__); // remove file protocols such as "phar://" etc.
144 144
         $prefix = $file[0] === DIRECTORY_SEPARATOR ? DIRECTORY_SEPARATOR : '';
145 145
         return $prefix . implode(DIRECTORY_SEPARATOR, $absolutes);
146 146
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/CacheContract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * @throws InvalidArgumentException
33 33
      */
34
-    public function get(string $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
34
+    public function get(string $cacheKey, callable $callback, DateInterval | int $expiresAfter = null): mixed
35 35
     {
36 36
         $cacheItem = $this->cacheInstance->getItem($cacheKey);
37 37
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * @throws InvalidArgumentException
55 55
      */
56
-    public function __invoke(string $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
56
+    public function __invoke(string $cacheKey, callable $callback, DateInterval | int $expiresAfter = null): mixed
57 57
     {
58 58
         return $this->get($cacheKey, $callback, $expiresAfter);
59 59
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Mongodb/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $this->database->selectCollection($collectionName)
101 101
                 ->createIndex(
102 102
                     [self::DRIVER_EDATE_WRAPPER_INDEX => 1],
103
-                    ['expireAfterSeconds' => 0,  'name' => 'auto_expire_index']
103
+                    ['expireAfterSeconds' => 0, 'name' => 'auto_expire_index']
104 104
                 );
105 105
         }
106 106
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
             )
232 232
         )->toArray()[0];
233 233
 
234
-        $arrayFilterRecursive = static function ($array, callable $callback = null) use (&$arrayFilterRecursive) {
234
+        $arrayFilterRecursive = static function($array, callable $callback = null) use (&$arrayFilterRecursive) {
235 235
             $array = $callback($array);
236 236
 
237 237
             if (\is_object($array) || \is_array($array)) {
@@ -243,12 +243,12 @@  discard block
 block discarded – undo
243 243
             return $array;
244 244
         };
245 245
 
246
-        $callback = static function ($item) {
246
+        $callback = static function($item) {
247 247
             /**
248 248
              * Remove unserializable properties
249 249
              */
250 250
             if ($item instanceof UTCDateTime) {
251
-                return (string)$item;
251
+                return (string) $item;
252 252
             }
253 253
             return $item;
254 254
         };
Please login to merge, or discard this patch.
lib/Phpfastcache/Config/ConfigurationOption.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     /**
166 166
      * @return callable|string
167 167
      */
168
-    public function getDefaultKeyHashFunction(): callable|string
168
+    public function getDefaultKeyHashFunction(): callable | string
169 169
     {
170 170
         return $this->defaultKeyHashFunction;
171 171
     }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      * @throws  PhpfastcacheInvalidConfigurationException
177 177
      * @throws PhpfastcacheLogicException
178 178
      */
179
-    public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static
179
+    public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static
180 180
     {
181 181
         $this->enforceLockedProperty(__FUNCTION__);
182 182
         if ($defaultKeyHashFunction && !\is_callable($defaultKeyHashFunction) && (\is_string($defaultKeyHashFunction) && !\function_exists($defaultKeyHashFunction))) {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     /**
190 190
      * @return callable|string
191 191
      */
192
-    public function getDefaultFileNameHashFunction(): callable|string
192
+    public function getDefaultFileNameHashFunction(): callable | string
193 193
     {
194 194
         return $this->defaultFileNameHashFunction;
195 195
     }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      * @throws  PhpfastcacheInvalidConfigurationException
201 201
      * @throws PhpfastcacheLogicException
202 202
      */
203
-    public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static
203
+    public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static
204 204
     {
205 205
         $this->enforceLockedProperty(__FUNCTION__);
206 206
         if (!\is_callable($defaultFileNameHashFunction) && (\is_string($defaultFileNameHashFunction) && !\function_exists($defaultFileNameHashFunction))) {
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
      */
342 342
     protected function getDefaultSuperGlobalAccessor(): \Closure
343 343
     {
344
-        return \Closure::fromCallable(static function (string $superGlobalName, ?string $keyName = null): string|int|float|array|bool|null {
344
+        return \Closure::fromCallable(static function(string $superGlobalName, ?string $keyName = null): string | int | float | array | bool | null {
345 345
             return match ($superGlobalName) {
346 346
                 'SERVER' => $keyName !== null ? $_SERVER[$keyName] ?? null : $_SERVER,
347 347
                 'REQUEST' => $keyName !== null ? $_REQUEST[$keyName] ?? null : $_REQUEST,
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
      * @return bool
187 187
      *   True if the item was successfully persisted. False if there was an error.
188 188
      */
189
-    public function save(ExtendedCacheItemInterface|CacheItemInterface $item): bool;
189
+    public function save(ExtendedCacheItemInterface | CacheItemInterface $item): bool;
190 190
 
191 191
     /**
192 192
      * Save multiple items, possible uses:
Please login to merge, or discard this patch.