Passed
Push — v9 ( 51468f...3f7b65 )
by Georges
03:38
created
lib/Phpfastcache/Cluster/Drivers/MasterSlaveReplication/Driver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function getItem(string $key): ExtendedCacheItemInterface
61 61
     {
62 62
         return $this->getStandardizedItem(
63
-            $this->makeOperation(static fn (ExtendedCacheItemPoolInterface $pool) => $pool->getItem($key)) ?? new Item($this, $key, $this->getEventManager()),
63
+            $this->makeOperation(static fn(ExtendedCacheItemPoolInterface $pool) => $pool->getItem($key)) ?? new Item($this, $key, $this->getEventManager()),
64 64
             $this
65 65
         );
66 66
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function hasItem(string $key): bool
111 111
     {
112 112
         return $this->makeOperation(
113
-            static fn (ExtendedCacheItemPoolInterface $pool) => $pool->hasItem($key)
113
+            static fn(ExtendedCacheItemPoolInterface $pool) => $pool->hasItem($key)
114 114
         );
115 115
     }
116 116
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function clear(): bool
121 121
     {
122 122
         return $this->makeOperation(
123
-            static fn (ExtendedCacheItemPoolInterface $pool) => $pool->clear()
123
+            static fn(ExtendedCacheItemPoolInterface $pool) => $pool->clear()
124 124
         );
125 125
     }
126 126
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function deleteItem(string $key): bool
131 131
     {
132 132
         return $this->makeOperation(
133
-            static fn (ExtendedCacheItemPoolInterface $pool) => $pool->deleteItem($key)
133
+            static fn(ExtendedCacheItemPoolInterface $pool) => $pool->deleteItem($key)
134 134
         );
135 135
     }
136 136
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function save(CacheItemInterface $item): bool
141 141
     {
142 142
         return $this->makeOperation(
143
-            function (ExtendedCacheItemPoolInterface $pool) use ($item) {
143
+            function(ExtendedCacheItemPoolInterface $pool) use ($item) {
144 144
                 /** @var ExtendedCacheItemInterface $item */
145 145
                 $item->setHit(true);
146 146
                 return $pool->save($this->getStandardizedItem($item, $pool));
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     public function commit(): bool
156 156
     {
157 157
         return $this->makeOperation(
158
-            static fn (ExtendedCacheItemPoolInterface $pool) => $pool->commit()
158
+            static fn(ExtendedCacheItemPoolInterface $pool) => $pool->commit()
159 159
         );
160 160
     }
161 161
 }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Mongodb/Driver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $this->database->selectCollection($collectionName)
100 100
                 ->createIndex(
101 101
                     [self::DRIVER_EDATE_WRAPPER_INDEX => 1],
102
-                    ['expireAfterSeconds' => 0,  'name' => 'auto_expire_index']
102
+                    ['expireAfterSeconds' => 0, 'name' => 'auto_expire_index']
103 103
                 );
104 104
         }
105 105
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                     self::DRIVER_CDATE_WRAPPER_INDEX =>  new UTCDateTime($item->getCreationDate()),
162 162
                 ];
163 163
             }
164
-            $result = (array)$this->getCollection()->updateOne(
164
+            $result = (array) $this->getCollection()->updateOne(
165 165
                 ['_id' => $this->getMongoDbItemKey($item)],
166 166
                 [
167 167
                     '$set' => $set,
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             )
231 231
         )->toArray()[0];
232 232
 
233
-        $arrayFilterRecursive = static function ($array, callable $callback = null) use (&$arrayFilterRecursive) {
233
+        $arrayFilterRecursive = static function($array, callable $callback = null) use (&$arrayFilterRecursive) {
234 234
             $array = $callback($array);
235 235
 
236 236
             if (\is_object($array) || \is_array($array)) {
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
             return $array;
243 243
         };
244 244
 
245
-        $callback = static function ($item) {
245
+        $callback = static function($item) {
246 246
             /**
247 247
              * Remove unserializable properties
248 248
              */
249 249
             if ($item instanceof UTCDateTime) {
250
-                return (string)$item;
250
+                return (string) $item;
251 251
             }
252 252
             return $item;
253 253
         };
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         if (count($servers) > 0) {
302 302
             $host = array_reduce(
303 303
                 $servers,
304
-                static fn ($carry, $data) => $carry . ($carry === '' ? '' : ',') . $data['host'] . ':' . $data['port'],
304
+                static fn($carry, $data) => $carry . ($carry === '' ? '' : ',') . $data['host'] . ':' . $data['port'],
305 305
                 ''
306 306
             );
307 307
             $port = false;
Please login to merge, or discard this patch.