Completed
Push — master ( 301894...a87d00 )
by Lars
02:21
created
src/Arrayy.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -609,8 +609,8 @@  discard block
 block discarded – undo
609 609
   }
610 610
 
611 611
   /**
612
-   * @param mixed      $path
613
-   * @param \callable  $callable
612
+   * @param string      $path
613
+   * @param \Closure  $callable
614 614
    * @param null|array $currentOffset
615 615
    */
616 616
   protected function callAtPath($path, $callable, &$currentOffset = null)
@@ -1763,7 +1763,7 @@  discard block
 block discarded – undo
1763 1763
   }
1764 1764
 
1765 1765
   /**
1766
-   * @param mixed               $glue
1766
+   * @param string               $glue
1767 1767
    * @param string|array|static $pieces
1768 1768
    * @param bool                $useKeys
1769 1769
    *
@@ -3639,7 +3639,7 @@  discard block
 block discarded – undo
3639 3639
   /**
3640 3640
    * Apply the given function to every element in the array, discarding the results.
3641 3641
    *
3642
-   * @param \callable $callable
3642
+   * @param \Closure $callable
3643 3643
    * @param bool      $recursive <p>Whether array will be walked recursively or no</p>
3644 3644
    *
3645 3645
    * @return static <p>(Mutable) Return this Arrayy object, with modified elements.</p>
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -850,25 +850,25 @@  discard block
 block discarded – undo
850 850
   {
851 851
     if ($recursive === true) {
852 852
       return \count(
853
-                 \array_intersect($needles, $this->keys(true)->getArray()),
854
-                 COUNT_RECURSIVE
855
-             )
856
-             ===
857
-             \count(
858
-                 $needles,
859
-                 COUNT_RECURSIVE
860
-             );
853
+                  \array_intersect($needles, $this->keys(true)->getArray()),
854
+                  COUNT_RECURSIVE
855
+              )
856
+              ===
857
+              \count(
858
+                  $needles,
859
+                  COUNT_RECURSIVE
860
+              );
861 861
     }
862 862
 
863 863
     return \count(
864
-               \array_intersect($needles, $this->keys()->getArray()),
865
-               COUNT_NORMAL
866
-           )
867
-           ===
868
-           \count(
869
-               $needles,
870
-               COUNT_NORMAL
871
-           );
864
+                \array_intersect($needles, $this->keys()->getArray()),
865
+                COUNT_NORMAL
866
+            )
867
+            ===
868
+            \count(
869
+                $needles,
870
+                COUNT_NORMAL
871
+            );
872 872
   }
873 873
 
874 874
   /**
@@ -921,8 +921,8 @@  discard block
 block discarded – undo
921 921
   public function containsValues(array $needles): bool
922 922
   {
923 923
     return \count(\array_intersect($needles, $this->array), COUNT_NORMAL)
924
-           ===
925
-           \count($needles, COUNT_NORMAL);
924
+            ===
925
+            \count($needles, COUNT_NORMAL);
926 926
   }
927 927
 
928 928
   /**
@@ -2179,15 +2179,15 @@  discard block
 block discarded – undo
2179 2179
 
2180 2180
     if ($recursive === true) {
2181 2181
       return $this->array_keys_recursive($this->array)
2182
-             ===
2183
-             \range(0, \count($this->array, COUNT_RECURSIVE) - 1);
2182
+              ===
2183
+              \range(0, \count($this->array, COUNT_RECURSIVE) - 1);
2184 2184
     }
2185 2185
 
2186 2186
     // non recursive
2187 2187
 
2188 2188
     return \array_keys($this->array)
2189
-           ===
2190
-           \range(0, \count($this->array, COUNT_NORMAL) - 1);
2189
+            ===
2190
+            \range(0, \count($this->array, COUNT_NORMAL) - 1);
2191 2191
   }
2192 2192
 
2193 2193
   /**
Please login to merge, or discard this patch.
Spacing   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
       return false;
82 82
     }
83 83
 
84
-    return (array)$this->array;
84
+    return (array) $this->array;
85 85
   }
86 86
 
87 87
   /**
@@ -317,8 +317,8 @@  discard block
 block discarded – undo
317 317
     }
318 318
 
319 319
     // php cast "bool"-index into "int"-index
320
-    if ((bool)$offset === $offset) {
321
-      $offset = (int)$offset;
320
+    if ((bool) $offset === $offset) {
321
+      $offset = (int) $offset;
322 322
     }
323 323
 
324 324
     $tmpReturn = \array_key_exists($offset, $this->array);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         (
330 330
             $tmpReturn === false
331 331
             &&
332
-            \strpos((string)$offset, $this->pathSeparator) === false
332
+            \strpos((string) $offset, $this->pathSeparator) === false
333 333
         )
334 334
     ) {
335 335
       return $tmpReturn;
@@ -337,16 +337,16 @@  discard block
 block discarded – undo
337 337
 
338 338
     $offsetExists = false;
339 339
 
340
-    if (\strpos((string)$offset, $this->pathSeparator) !== false) {
340
+    if (\strpos((string) $offset, $this->pathSeparator) !== false) {
341 341
 
342 342
       $offsetExists = false;
343
-      $explodedPath = \explode($this->pathSeparator, (string)$offset);
343
+      $explodedPath = \explode($this->pathSeparator, (string) $offset);
344 344
       $lastOffset = \array_pop($explodedPath);
345 345
       $containerPath = \implode($this->pathSeparator, $explodedPath);
346 346
 
347 347
       $this->callAtPath(
348 348
           $containerPath,
349
-          function ($container) use ($lastOffset, &$offsetExists) {
349
+          function($container) use ($lastOffset, &$offsetExists) {
350 350
             $offsetExists = \array_key_exists($lastOffset, $container);
351 351
           }
352 352
       );
@@ -399,14 +399,14 @@  discard block
 block discarded – undo
399 399
       return;
400 400
     }
401 401
 
402
-    if (\strpos((string)$offset, $this->pathSeparator) !== false) {
402
+    if (\strpos((string) $offset, $this->pathSeparator) !== false) {
403 403
 
404
-      $path = \explode($this->pathSeparator, (string)$offset);
404
+      $path = \explode($this->pathSeparator, (string) $offset);
405 405
       $pathToUnset = \array_pop($path);
406 406
 
407 407
       $this->callAtPath(
408 408
           \implode($this->pathSeparator, $path),
409
-          function (&$offset) use ($pathToUnset) {
409
+          function(&$offset) use ($pathToUnset) {
410 410
             unset($offset[$pathToUnset]);
411 411
           }
412 412
       );
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     }
443 443
 
444 444
     if (\strpos($class, '\\') === 0) {
445
-      $class = '\\' . $class;
445
+      $class = '\\'.$class;
446 446
       if (\class_exists($class)) {
447 447
         $this->iteratorClass = $class;
448 448
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
       }
451 451
     }
452 452
 
453
-    throw new \InvalidArgumentException('The iterator class does not exist: ' . $class);
453
+    throw new \InvalidArgumentException('The iterator class does not exist: '.$class);
454 454
   }
455 455
 
456 456
   /**
@@ -515,11 +515,11 @@  discard block
 block discarded – undo
515 515
     $result = [];
516 516
     foreach ($this->array as $key => $item) {
517 517
       if ($item instanceof self) {
518
-        $result[$prefix . $key] = $item->appendToEachKey($prefix);
518
+        $result[$prefix.$key] = $item->appendToEachKey($prefix);
519 519
       } elseif (\is_array($item)) {
520
-        $result[$prefix . $key] = self::create($item)->appendToEachKey($prefix)->toArray();
520
+        $result[$prefix.$key] = self::create($item)->appendToEachKey($prefix)->toArray();
521 521
       } else {
522
-        $result[$prefix . $key] = $item;
522
+        $result[$prefix.$key] = $item;
523 523
       }
524 524
     }
525 525
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
       } elseif (\is_object($item)) {
545 545
         $result[$key] = $item;
546 546
       } else {
547
-        $result[$key] = $prefix . $item;
547
+        $result[$key] = $prefix.$item;
548 548
       }
549 549
     }
550 550
 
@@ -755,8 +755,8 @@  discard block
 block discarded – undo
755 755
   public function clean()
756 756
   {
757 757
     return $this->filter(
758
-        function ($value) {
759
-          return (bool)$value;
758
+        function($value) {
759
+          return (bool) $value;
760 760
         }
761 761
     );
762 762
   }
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
       return $this->in_array_recursive(
806 806
           UTF8::strtoupper($value),
807 807
           $this->walk(
808
-              function (&$val) {
808
+              function(&$val) {
809 809
                 $val = UTF8::strtoupper($val);
810 810
               },
811 811
               true
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
     return \in_array(
818 818
         UTF8::strtoupper($value),
819 819
         $this->walk(
820
-            function (&$val) {
820
+            function(&$val) {
821 821
               $val = UTF8::strtoupper($val);
822 822
             },
823 823
             false
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
     // trim all string in the array
1040 1040
     \array_walk(
1041 1041
         $array,
1042
-        function (&$val) {
1042
+        function(&$val) {
1043 1043
           /** @noinspection ReferenceMismatchInspection */
1044 1044
           if (\is_string($val)) {
1045 1045
             $val = \trim($val);
@@ -1276,7 +1276,7 @@  discard block
 block discarded – undo
1276 1276
     }
1277 1277
 
1278 1278
     if ($isObject && \method_exists($array, '__toArray')) {
1279
-      return (array)$array->__toArray();
1279
+      return (array) $array->__toArray();
1280 1280
     }
1281 1281
 
1282 1282
     /** @noinspection ReferenceMismatchInspection */
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
         ||
1286 1286
         ($isObject && \method_exists($array, '__toString'))
1287 1287
     ) {
1288
-      return [(string)$array];
1288
+      return [(string) $array];
1289 1289
     }
1290 1290
 
1291 1291
     throw new \InvalidArgumentException(
@@ -1387,54 +1387,54 @@  discard block
 block discarded – undo
1387 1387
     }
1388 1388
 
1389 1389
     $ops = [
1390
-        'eq'          => function ($item, $prop, $value) {
1390
+        'eq'          => function($item, $prop, $value) {
1391 1391
           return $item[$prop] === $value;
1392 1392
         },
1393
-        'gt'          => function ($item, $prop, $value) {
1393
+        'gt'          => function($item, $prop, $value) {
1394 1394
           return $item[$prop] > $value;
1395 1395
         },
1396
-        'ge'          => function ($item, $prop, $value) {
1396
+        'ge'          => function($item, $prop, $value) {
1397 1397
           return $item[$prop] >= $value;
1398 1398
         },
1399
-        'gte'         => function ($item, $prop, $value) {
1399
+        'gte'         => function($item, $prop, $value) {
1400 1400
           return $item[$prop] >= $value;
1401 1401
         },
1402
-        'lt'          => function ($item, $prop, $value) {
1402
+        'lt'          => function($item, $prop, $value) {
1403 1403
           return $item[$prop] < $value;
1404 1404
         },
1405
-        'le'          => function ($item, $prop, $value) {
1405
+        'le'          => function($item, $prop, $value) {
1406 1406
           return $item[$prop] <= $value;
1407 1407
         },
1408
-        'lte'         => function ($item, $prop, $value) {
1408
+        'lte'         => function($item, $prop, $value) {
1409 1409
           return $item[$prop] <= $value;
1410 1410
         },
1411
-        'ne'          => function ($item, $prop, $value) {
1411
+        'ne'          => function($item, $prop, $value) {
1412 1412
           return $item[$prop] !== $value;
1413 1413
         },
1414
-        'contains'    => function ($item, $prop, $value) {
1415
-          return \in_array($item[$prop], (array)$value, true);
1414
+        'contains'    => function($item, $prop, $value) {
1415
+          return \in_array($item[$prop], (array) $value, true);
1416 1416
         },
1417
-        'notContains' => function ($item, $prop, $value) {
1418
-          return !\in_array($item[$prop], (array)$value, true);
1417
+        'notContains' => function($item, $prop, $value) {
1418
+          return !\in_array($item[$prop], (array) $value, true);
1419 1419
         },
1420
-        'newer'       => function ($item, $prop, $value) {
1420
+        'newer'       => function($item, $prop, $value) {
1421 1421
           return \strtotime($item[$prop]) > \strtotime($value);
1422 1422
         },
1423
-        'older'       => function ($item, $prop, $value) {
1423
+        'older'       => function($item, $prop, $value) {
1424 1424
           return \strtotime($item[$prop]) < \strtotime($value);
1425 1425
         },
1426 1426
     ];
1427 1427
 
1428 1428
     $result = \array_values(
1429 1429
         \array_filter(
1430
-            (array)$this->array,
1431
-            function ($item) use (
1430
+            (array) $this->array,
1431
+            function($item) use (
1432 1432
                 $property,
1433 1433
                 $value,
1434 1434
                 $ops,
1435 1435
                 $comparisonOp
1436 1436
             ) {
1437
-              $item = (array)$item;
1437
+              $item = (array) $item;
1438 1438
               $itemArrayy = new Arrayy($item);
1439 1439
               $item[$property] = $itemArrayy->get($property, []);
1440 1440
 
@@ -1507,9 +1507,9 @@  discard block
 block discarded – undo
1507 1507
   {
1508 1508
     if ($number === null) {
1509 1509
       $arrayTmp = $this->array;
1510
-      $array = (array)\array_shift($arrayTmp);
1510
+      $array = (array) \array_shift($arrayTmp);
1511 1511
     } else {
1512
-      $number = (int)$number;
1512
+      $number = (int) $number;
1513 1513
       $arrayTmp = $this->array;
1514 1514
       $array = \array_splice($arrayTmp, 0, $number, true);
1515 1515
     }
@@ -1527,9 +1527,9 @@  discard block
 block discarded – undo
1527 1527
   public function firstsMutable(int $number = null)
1528 1528
   {
1529 1529
     if ($number === null) {
1530
-      $this->array = (array)\array_shift($this->array);
1530
+      $this->array = (array) \array_shift($this->array);
1531 1531
     } else {
1532
-      $number = (int)$number;
1532
+      $number = (int) $number;
1533 1533
       $this->array = \array_splice($this->array, 0, $number, true);
1534 1534
     }
1535 1535
 
@@ -1571,8 +1571,8 @@  discard block
 block discarded – undo
1571 1571
     }
1572 1572
 
1573 1573
     // php cast "bool"-index into "int"-index
1574
-    if ((bool)$key === $key) {
1575
-      $key = (int)$key;
1574
+    if ((bool) $key === $key) {
1575
+      $key = (int) $key;
1576 1576
     }
1577 1577
 
1578 1578
     if (\array_key_exists($key, $usedArray) === true) {
@@ -1584,7 +1584,7 @@  discard block
 block discarded – undo
1584 1584
     }
1585 1585
 
1586 1586
     // Crawl through array, get key according to object or not
1587
-    foreach (\explode($this->pathSeparator, (string)$key) as $segment) {
1587
+    foreach (\explode($this->pathSeparator, (string) $key) as $segment) {
1588 1588
       if (!isset($usedArray[$segment])) {
1589 1589
         return $fallback instanceof \Closure ? $fallback() : $fallback;
1590 1590
       }
@@ -1756,7 +1756,7 @@  discard block
 block discarded – undo
1756 1756
    */
1757 1757
   public function group($grouper, bool $saveKeys = false)
1758 1758
   {
1759
-    $array = (array)$this->array;
1759
+    $array = (array) $this->array;
1760 1760
     $result = [];
1761 1761
 
1762 1762
     // Iterate over values, group by property/results from closure.
@@ -1855,7 +1855,7 @@  discard block
 block discarded – undo
1855 1855
       );
1856 1856
     }
1857 1857
 
1858
-    return (string)$pieces;
1858
+    return (string) $pieces;
1859 1859
   }
1860 1860
 
1861 1861
   /**
@@ -1978,7 +1978,7 @@  discard block
 block discarded – undo
1978 1978
    */
1979 1979
   protected function internalRemove($key): bool
1980 1980
   {
1981
-    $path = \explode($this->pathSeparator, (string)$key);
1981
+    $path = \explode($this->pathSeparator, (string) $key);
1982 1982
 
1983 1983
     // Crawl though the keys
1984 1984
     while (\count($path, COUNT_NORMAL) > 1) {
@@ -2013,8 +2013,8 @@  discard block
 block discarded – undo
2013 2013
     }
2014 2014
 
2015 2015
     // init
2016
-    $array =& $this->array;
2017
-    $path = \explode($this->pathSeparator, (string)$key);
2016
+    $array = & $this->array;
2017
+    $path = \explode($this->pathSeparator, (string) $key);
2018 2018
 
2019 2019
     // Crawl through the keys
2020 2020
     while (\count($path, COUNT_NORMAL) > 1) {
@@ -2027,7 +2027,7 @@  discard block
 block discarded – undo
2027 2027
         $array[$key] = static::create([]);
2028 2028
       }
2029 2029
 
2030
-      $array =& $array[$key];
2030
+      $array = & $array[$key];
2031 2031
     }
2032 2032
 
2033 2033
     $array[\array_shift($path)] = $value;
@@ -2286,12 +2286,12 @@  discard block
 block discarded – undo
2286 2286
       if ($poppedValue === null) {
2287 2287
         $poppedValue = [$poppedValue];
2288 2288
       } else {
2289
-        $poppedValue = (array)$poppedValue;
2289
+        $poppedValue = (array) $poppedValue;
2290 2290
       }
2291 2291
 
2292 2292
       $arrayy = static::create($poppedValue);
2293 2293
     } else {
2294
-      $number = (int)$number;
2294
+      $number = (int) $number;
2295 2295
       $arrayy = $this->rest(-$number);
2296 2296
     }
2297 2297
 
@@ -2317,12 +2317,12 @@  discard block
 block discarded – undo
2317 2317
       if ($poppedValue === null) {
2318 2318
         $poppedValue = [$poppedValue];
2319 2319
       } else {
2320
-        $poppedValue = (array)$poppedValue;
2320
+        $poppedValue = (array) $poppedValue;
2321 2321
       }
2322 2322
 
2323 2323
       $this->array = static::create($poppedValue)->array;
2324 2324
     } else {
2325
-      $number = (int)$number;
2325
+      $number = (int) $number;
2326 2326
       $this->array = $this->rest(-$number)->array;
2327 2327
     }
2328 2328
 
@@ -2661,7 +2661,7 @@  discard block
 block discarded – undo
2661 2661
       } elseif (\is_array($item)) {
2662 2662
         $result[$key] = self::create($item)->prependToEachKey($suffix)->toArray();
2663 2663
       } else {
2664
-        $result[$key . $suffix] = $item;
2664
+        $result[$key.$suffix] = $item;
2665 2665
       }
2666 2666
 
2667 2667
     }
@@ -2687,7 +2687,7 @@  discard block
 block discarded – undo
2687 2687
       } elseif (\is_object($item)) {
2688 2688
         $result[$key] = $item;
2689 2689
       } else {
2690
-        $result[$key] = $item . $suffix;
2690
+        $result[$key] = $item.$suffix;
2691 2691
       }
2692 2692
     }
2693 2693
 
@@ -2775,7 +2775,7 @@  discard block
 block discarded – undo
2775 2775
       );
2776 2776
     }
2777 2777
 
2778
-    $result = (array)\array_rand($this->array, $number);
2778
+    $result = (array) \array_rand($this->array, $number);
2779 2779
 
2780 2780
     return static::create($result);
2781 2781
   }
@@ -2872,7 +2872,7 @@  discard block
 block discarded – undo
2872 2872
     if ($result === null) {
2873 2873
       $this->array = [];
2874 2874
     } else {
2875
-      $this->array = (array)$result;
2875
+      $this->array = (array) $result;
2876 2876
     }
2877 2877
 
2878 2878
     return static::create($this->array);
@@ -2998,7 +2998,7 @@  discard block
 block discarded – undo
2998 2998
       return new static();
2999 2999
     }
3000 3000
 
3001
-    return static::create(\array_fill(0, (int)$times, $this->array));
3001
+    return static::create(\array_fill(0, (int) $times, $this->array));
3002 3002
   }
3003 3003
 
3004 3004
   /**
@@ -3091,7 +3091,7 @@  discard block
 block discarded – undo
3091 3091
   public function replaceValues($search, $replacement = '')
3092 3092
   {
3093 3093
     $array = $this->each(
3094
-        function ($value) use ($search, $replacement) {
3094
+        function($value) use ($search, $replacement) {
3095 3095
           return UTF8::str_replace($search, $replacement, $value);
3096 3096
         }
3097 3097
     );
@@ -3172,8 +3172,8 @@  discard block
 block discarded – undo
3172 3172
     }
3173 3173
 
3174 3174
     // php cast "bool"-index into "int"-index
3175
-    if ((bool)$index === $index) {
3176
-      $index = (int)$index;
3175
+    if ((bool) $index === $index) {
3176
+      $index = (int) $index;
3177 3177
     }
3178 3178
 
3179 3179
     if (\array_key_exists($index, $this->array) === true) {
@@ -3414,7 +3414,7 @@  discard block
 block discarded – undo
3414 3414
    */
3415 3415
   public function sorter($sorter = null, $direction = SORT_ASC, int $strategy = SORT_REGULAR)
3416 3416
   {
3417
-    $array = (array)$this->array;
3417
+    $array = (array) $this->array;
3418 3418
     $direction = $this->getDirection($direction);
3419 3419
 
3420 3420
     // Transform all values into their results.
@@ -3423,7 +3423,7 @@  discard block
 block discarded – undo
3423 3423
 
3424 3424
       $that = $this;
3425 3425
       $results = $arrayy->each(
3426
-          function ($value) use ($sorter, $that) {
3426
+          function($value) use ($sorter, $that) {
3427 3427
             return \is_callable($sorter) ? $sorter($value) : $that->get($sorter, null, $value);
3428 3428
           }
3429 3429
       );
@@ -3521,7 +3521,7 @@  discard block
 block discarded – undo
3521 3521
     if ($arrayCount === 0) {
3522 3522
       $result = [];
3523 3523
     } else {
3524
-      $splitSize = (int)\ceil($arrayCount / $numberOfPieces);
3524
+      $splitSize = (int) \ceil($arrayCount / $numberOfPieces);
3525 3525
       $result = \array_chunk($this->array, $splitSize, $keepKeys);
3526 3526
     }
3527 3527
 
@@ -3536,12 +3536,12 @@  discard block
 block discarded – undo
3536 3536
   public function stripEmpty()
3537 3537
   {
3538 3538
     return $this->filter(
3539
-        function ($item) {
3539
+        function($item) {
3540 3540
           if ($item === null) {
3541 3541
             return false;
3542 3542
           }
3543 3543
 
3544
-          return (bool)\trim((string)$item);
3544
+          return (bool) \trim((string) $item);
3545 3545
         }
3546 3546
     );
3547 3547
   }
@@ -3609,7 +3609,7 @@  discard block
 block discarded – undo
3609 3609
 
3610 3610
     $this->array = \array_reduce(
3611 3611
         $this->array,
3612
-        function ($resultArray, $value) {
3612
+        function($resultArray, $value) {
3613 3613
           if (!\in_array($value, $resultArray, true)) {
3614 3614
             $resultArray[] = $value;
3615 3615
           }
@@ -3622,7 +3622,7 @@  discard block
 block discarded – undo
3622 3622
     if ($this->array === null) {
3623 3623
       $this->array = [];
3624 3624
     } else {
3625
-      $this->array = (array)$this->array;
3625
+      $this->array = (array) $this->array;
3626 3626
     }
3627 3627
 
3628 3628
     return $this;
@@ -3642,7 +3642,7 @@  discard block
 block discarded – undo
3642 3642
 
3643 3643
     $this->array = \array_reduce(
3644 3644
         \array_keys($array),
3645
-        function ($resultArray, $key) use ($array) {
3645
+        function($resultArray, $key) use ($array) {
3646 3646
           if (!\in_array($array[$key], $resultArray, true)) {
3647 3647
             $resultArray[$key] = $array[$key];
3648 3648
           }
@@ -3655,7 +3655,7 @@  discard block
 block discarded – undo
3655 3655
     if ($this->array === null) {
3656 3656
       $this->array = [];
3657 3657
     } else {
3658
-      $this->array = (array)$this->array;
3658
+      $this->array = (array) $this->array;
3659 3659
     }
3660 3660
 
3661 3661
     return $this;
@@ -3695,7 +3695,7 @@  discard block
 block discarded – undo
3695 3695
    */
3696 3696
   public function values()
3697 3697
   {
3698
-    return static::create(\array_values((array)$this->array));
3698
+    return static::create(\array_values((array) $this->array));
3699 3699
   }
3700 3700
 
3701 3701
   /**
Please login to merge, or discard this patch.
src/StaticArrayy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     }
44 44
 
45 45
     if (!isset(static::$methodArgs[$name])) {
46
-      throw new \BadMethodCallException($name . ' is not a valid method');
46
+      throw new \BadMethodCallException($name.' is not a valid method');
47 47
     }
48 48
 
49 49
     $numArgs = \count($arguments);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
    */
104 104
   public static function repeat($data, $times): Arrayy
105 105
   {
106
-    $times = (int)$times;
106
+    $times = (int) $times;
107 107
 
108 108
     if ($times === 0 || empty($data)) {
109 109
       return Arrayy::create();
Please login to merge, or discard this patch.