Passed
Pull Request — master (#624)
by
unknown
02:01
created
lib/Phpfastcache/Drivers/Mongodb/Driver.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                                 ->getTimestamp()) * 1000) : new UTCDateTime(\time() * 1000)),
125 125
                     ];
126 126
                 }
127
-                $result = (array)$this->getCollection()->updateOne(
127
+                $result = (array) $this->getCollection()->updateOne(
128 128
                     ['_id' => $item->getEncodedKey()],
129 129
                     [
130 130
                         '$set' => $set,
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
         $username = $this->getConfig()->getUsername();
233 233
         $password = $this->getConfig()->getPassword();
234 234
 
235
-        if( \count($servers) > 0 ){
236
-            $host = array_reduce($servers, function($carry, $data){
237
-                $carry .= ($carry === '' ? '' : ',').$data['host'].':'.$data['port'];
235
+        if (\count($servers) > 0) {
236
+            $host = array_reduce($servers, function($carry, $data) {
237
+                $carry .= ($carry === '' ? '' : ',') . $data['host'] . ':' . $data['port'];
238 238
                 return $carry;
239 239
             }, '');
240 240
             $port = false;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             $host,
249 249
             ($port !== 27017 && $port !== false ? ":{$port}" : ''),
250 250
             ($databaseName ? "/{$databaseName}" : ''),
251
-            (count($options) > 0 ? '?'.http_build_query($options) : ''),
251
+            (count($options) > 0 ? '?' . http_build_query($options) : ''),
252 252
         ]);
253 253
     }
254 254
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             'verbose' => true,
284 284
         ]))->toArray()[0];
285 285
 
286
-        $array_filter_recursive = function ($array, callable $callback = null) use (&$array_filter_recursive) {
286
+        $array_filter_recursive = function($array, callable $callback = null) use (&$array_filter_recursive) {
287 287
             $array = $callback($array);
288 288
 
289 289
             if (\is_object($array) || \is_array($array)) {
@@ -295,12 +295,12 @@  discard block
 block discarded – undo
295 295
             return $array;
296 296
         };
297 297
 
298
-        $callback = function ($item) {
298
+        $callback = function($item) {
299 299
             /**
300 300
              * Remove unserializable properties
301 301
              */
302 302
             if ($item instanceof \MongoDB\BSON\UTCDateTime) {
303
-                return (string)$item;
303
+                return (string) $item;
304 304
             }
305 305
             return $item;
306 306
         };
Please login to merge, or discard this patch.