Passed
Push — v9 ( eba2c2...f6ac95 )
by Georges
04:26 queued 02:24
created
lib/Phpfastcache/Util/Directory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
         /**
143 143
          * Allows to dereference char
144 144
          */
145
-        $file = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__);// remove file protocols such as "phar://" etc.
145
+        $file = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__); // remove file protocols such as "phar://" etc.
146 146
         $prefix = $file[0] === DIRECTORY_SEPARATOR ? DIRECTORY_SEPARATOR : '';
147 147
         return $prefix . implode(DIRECTORY_SEPARATOR, $absolutes);
148 148
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Util/ClassNamespaceResolverTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      *
37 37
      * @return array A class map array
38 38
      */
39
-    protected static function createClassMap(Iterator|string|array $dir): array
39
+    protected static function createClassMap(Iterator | string | array $dir): array
40 40
     {
41 41
         if (\is_string($dir)) {
42 42
             $dir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
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/EventManager.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
     public function unbindAllEventCallbacks(): bool
142 142
     {
143
-        $this->events =  [
143
+        $this->events = [
144 144
             self::ON_EVERY_EVENT => []
145 145
         ];
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
@@ -45,11 +45,11 @@
 block discarded – undo
45 45
      * @return mixed
46 46
      * @throws InvalidArgumentException
47 47
      */
48
-    public function get(string $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
48
+    public function get(string $cacheKey, callable $callback, DateInterval | int $expiresAfter = null): mixed
49 49
     {
50 50
         $cacheItem = $this->cacheInstance->getItem($cacheKey);
51 51
 
52
-        if (! $cacheItem->isHit()) {
52
+        if (!$cacheItem->isHit()) {
53 53
             /*
54 54
             *
55 55
     * Parameter $cacheItem will be available as of 8.0.6
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/TaggableCacheItemTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      */
73 73
     public function hasTags(array $tagNames, int $strategy = TaggableCacheItemInterface::TAG_STRATEGY_ONE): bool
74 74
     {
75
-        return match ($strategy) {
75
+        return match($strategy) {
76 76
             TaggableCacheItemInterface::TAG_STRATEGY_ONE => !empty(array_intersect($tagNames, $this->tags)),
77 77
             TaggableCacheItemInterface::TAG_STRATEGY_ALL => empty(\array_diff($tagNames, $this->tags)),
78 78
             TaggableCacheItemInterface::TAG_STRATEGY_ONLY => empty(\array_diff($tagNames, $this->tags)) && empty(\array_diff($this->tags, $tagNames)),
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/Item/ExtendedCacheItemTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         return $this;
231 231
     }
232 232
 
233
-    public function append(array|string $data): ExtendedCacheItemInterface
233
+    public function append(array | string $data): ExtendedCacheItemInterface
234 234
     {
235 235
         if (\is_array($this->data)) {
236 236
             $this->data[] = $data;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         return $this;
242 242
     }
243 243
 
244
-    public function prepend(array|string $data): ExtendedCacheItemInterface
244
+    public function prepend(array | string $data): ExtendedCacheItemInterface
245 245
     {
246 246
         if (\is_array($this->data)) {
247 247
             \array_unshift($this->data, $data);
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/ExtendedCacheItemInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      * @return ExtendedCacheItemInterface
158 158
      * @throws PhpfastcacheInvalidArgumentException
159 159
      */
160
-    public function append(array|string $data): ExtendedCacheItemInterface;
160
+    public function append(array | string $data): ExtendedCacheItemInterface;
161 161
 
162 162
     /**
163 163
      * @param array|string $data
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @return ExtendedCacheItemInterface
166 166
      * @throws PhpfastcacheInvalidArgumentException
167 167
      */
168
-    public function prepend(array|string $data): ExtendedCacheItemInterface;
168
+    public function prepend(array | string $data): ExtendedCacheItemInterface;
169 169
 
170 170
     /**
171 171
      * Return the data as a well-formatted string.
Please login to merge, or discard this patch.