Passed
Push — master ( b0ec1a...8763d4 )
by Divine Niiquaye
01:43
created
src/CacheItemPool.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $this->miss = new stdClass();
69 69
 
70 70
         $this->createCacheItem = Closure::bind(
71
-            static function ($key, $value, $isHit) {
71
+            static function($key, $value, $isHit) {
72 72
                 $item = new CacheItem();
73 73
                 $item->key = $key;
74 74
                 $item->value = $v = $value;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         );
96 96
         $getId                 = Closure::fromCallable([$this, 'getId']);
97 97
         $this->mergeByLifetime = Closure::bind(
98
-            static function ($deferred, &$expiredIds) use ($getId) {
98
+            static function($deferred, &$expiredIds) use ($getId) {
99 99
                 $byLifetime = [];
100 100
                 $now = \microtime(true);
101 101
                 $expiredIds = [];
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         $items = $this->doFetch($kIds);
185
-        $kIds   = \array_combine($kIds, $keys);
185
+        $kIds = \array_combine($kIds, $keys);
186 186
 
187 187
         return $this->generateItems($items, $kIds);
188 188
     }
Please login to merge, or discard this patch.
src/FastCache.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             } elseif ($fallback) {
138 138
                 $result[$key] = $this->save(
139 139
                     $key,
140
-                    function (CacheItemInterface $item, bool $save) use ($key, $fallback) {
140
+                    function(CacheItemInterface $item, bool $save) use ($key, $fallback) {
141 141
                         return $fallback(...[$key, &$item, &$save]);
142 142
                     },
143 143
                     $beta
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         }
149 149
 
150 150
         return \array_map(
151
-            function ($value) {
151
+            function($value) {
152 152
                 if ($value instanceof CacheItemInterface) {
153 153
                     return $value->get();
154 154
                 }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         static $setExpired;
186 186
 
187 187
         $setExpired = Closure::bind(
188
-            static function (CacheItem $item) {
188
+            static function(CacheItem $item) {
189 189
                 if (null === $item->expiry) {
190 190
                     return null;
191 191
                 }
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
         );
198 198
 
199 199
         if ($this->storage instanceof PhpCachePool) {
200
-            $setExpired = static function (PhpCacheItem $item) {
200
+            $setExpired = static function(PhpCacheItem $item) {
201 201
                 return $item->getExpirationTimestamp();
202 202
             };
203 203
         }
204 204
 
205
-        $callback = function (CacheItemInterface $item, bool $save) use ($key, $callback) {
205
+        $callback = function(CacheItemInterface $item, bool $save) use ($key, $callback) {
206 206
             // don't wrap nor save recursive calls
207 207
             if (isset($this->computing[$key])) {
208 208
                 $value = $callback(...[&$item, &$save]);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
             $key[0][0] = \get_class($callback[0]);
247 247
         }
248 248
 
249
-        return $this->load($key, function (CacheItemInterface $item, bool $save) use ($callback, $key) {
249
+        return $this->load($key, function(CacheItemInterface $item, bool $save) use ($callback, $key) {
250 250
             $dependencies = \array_merge(\array_slice($key, 1), [&$item, &$save]);
251 251
 
252 252
             return $callback(...$dependencies);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function wrap(callable $callback, ?float $beta = null): callable
260 260
     {
261
-        return function () use ($callback, $beta) {
261
+        return function() use ($callback, $beta) {
262 262
             $key = [$callback, \func_get_args()];
263 263
 
264 264
             if (\is_array($callback) && \is_object($callback[0])) {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
             if (null === $data = $this->load($key)) {
269 269
                 $data = $this->save(
270 270
                     $key,
271
-                    function (CacheItemInterface $item, bool $save) use ($callback, $key) {
271
+                    function(CacheItemInterface $item, bool $save) use ($callback, $key) {
272 272
                         $dependencies = \array_merge($key[1], [&$item, &$save]);
273 273
 
274 274
                         return $callback(...$dependencies);
Please login to merge, or discard this patch.