Passed
Push — master ( 1e605b...372d62 )
by Georges
01:58
created
lib/Phpfastcache/CacheManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@
 block discarded – undo
318 318
         $found = false;
319 319
         self::$instances = \array_filter(
320 320
             \array_map(
321
-                static function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
321
+                static function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
322 322
                     if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) {
323 323
                         $found = true;
324 324
                         return null;
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcache/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcached/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
             ->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
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Config/ConfigurationOptionInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,23 +58,23 @@
 block discarded – undo
58 58
     /**
59 59
      * @return callable|string
60 60
      */
61
-    public function getDefaultKeyHashFunction(): callable|string;
61
+    public function getDefaultKeyHashFunction(): callable | string;
62 62
     /**
63 63
      * @param callable|string $defaultKeyHashFunction
64 64
      * @return ConfigurationOption
65 65
      * @throws  PhpfastcacheInvalidConfigurationException
66 66
      */
67
-    public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static;
67
+    public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static;
68 68
     /**
69 69
      * @return callable|string
70 70
      */
71
-    public function getDefaultFileNameHashFunction(): callable|string;
71
+    public function getDefaultFileNameHashFunction(): callable | string;
72 72
     /**
73 73
      * @param callable|string $defaultFileNameHashFunction
74 74
      * @return ConfigurationOption
75 75
      * @throws  PhpfastcacheInvalidConfigurationException
76 76
      */
77
-    public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static;
77
+    public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static;
78 78
 
79 79
     /**
80 80
      * @return string
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/CacheItemTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      * @throws PhpfastcacheInvalidArgumentException
119 119
      * @throws \Exception
120 120
      */
121
-    public function expiresAfter(int|\DateInterval|null $time): static
121
+    public function expiresAfter(int | \DateInterval | null $time): static
122 122
     {
123 123
         if (\is_numeric($time)) {
124 124
             if ($time <= 0) {
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Pool/TaggableCacheItemPoolInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      *   MUST be thrown.
227 227
      *
228 228
      */
229
-    public function appendItemsByTag(string $tagName, array|string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
229
+    public function appendItemsByTag(string $tagName, array | string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
230 230
 
231 231
     /**
232 232
      * Append the items from the pool by one of multiple tag names.
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      *   MUST be thrown.
246 246
      *
247 247
      */
248
-    public function appendItemsByTags(array $tagNames, array|string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
248
+    public function appendItemsByTags(array $tagNames, array | string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
249 249
 
250 250
     /**
251 251
      * Prepend the items from the pool by tag.
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      *   MUST be thrown.
265 265
      *
266 266
      */
267
-    public function prependItemsByTag(string $tagName, array|string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
267
+    public function prependItemsByTag(string $tagName, array | string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
268 268
 
269 269
     /**
270 270
      * Prepend the items from the pool by one of multiple tag names.
@@ -283,5 +283,5 @@  discard block
 block discarded – undo
283 283
      *   MUST be thrown.
284 284
      *
285 285
      */
286
-    public function prependItemsByTags(array $tagNames, array|string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
286
+    public function prependItemsByTags(array $tagNames, array | string $data, int $strategy = self::TAG_STRATEGY_ONE): bool;
287 287
 }
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/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.