Passed
Pull Request — master (#19)
by
unknown
02:33
created
src/Zicht/Itertools/lib/ZipIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
     public function __construct(/* \Iterator $iterable1, \Iterator $iterable2, ... */)
50 50
     {
51
-        parent::__construct(\MultipleIterator::MIT_NEED_ALL| \MultipleIterator::MIT_KEYS_NUMERIC);
51
+        parent::__construct(\MultipleIterator::MIT_NEED_ALL|\MultipleIterator::MIT_KEYS_NUMERIC);
52 52
         foreach (func_get_args() as $iterable) {
53 53
             if (!$iterable instanceof \Iterator) {
54 54
                 throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
Please login to merge, or discard this patch.
src/Zicht/Itertools/lib/MapIterator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function __construct(\Closure $valueFunc /* [\Closure $keyFunc], \Iterator $iterable1, [\Iterator $iterable2, [...]] */)
63 63
     {
64
-        parent::__construct(\MultipleIterator::MIT_NEED_ALL| \MultipleIterator::MIT_KEYS_NUMERIC);
64
+        parent::__construct(\MultipleIterator::MIT_NEED_ALL|\MultipleIterator::MIT_KEYS_NUMERIC);
65 65
         $args = func_get_args();
66 66
         $argsContainsKeyFunc = $args[1] instanceof \Closure;
67 67
         $this->valueFunc = $args[0];
68
-        $this->keyFunc = $argsContainsKeyFunc ? $args[1] : function () { return $this->genericKeysToKey(func_get_args()); };
68
+        $this->keyFunc = $argsContainsKeyFunc ? $args[1] : function() { return $this->genericKeysToKey(func_get_args()); };
69 69
         foreach (array_slice($args, $argsContainsKeyFunc ? 2 : 1) as $iterable) {
70 70
             if (!$iterable instanceof \Iterator) {
71 71
                 throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         foreach ($keys as $key) {
87 87
             if ($key !== $value) {
88 88
                 // the keys are different, we will make a new string identifying this entry
89
-                return join(':', array_map(function ($key) { return (string)$key; }, $keys));
89
+                return join(':', array_map(function($key) { return (string)$key; }, $keys));
90 90
             }
91 91
         }
92 92
 
Please login to merge, or discard this patch.
src/Zicht/Itertools/itertools.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     // http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
175 175
 
176 176
     $iterables = array_map(
177
-        function ($iterable) {
177
+        function($iterable) {
178 178
             return conversions\mixed_to_iterator($iterable);
179 179
         },
180 180
         func_get_args()
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     // http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
328 328
 
329 329
     $iterables = array_map(
330
-        function ($iterable) {
330
+        function($iterable) {
331 331
             return conversions\mixed_to_iterator($iterable);
332 332
         },
333 333
         array_slice(func_get_args(), 1)
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
     }
526 526
 
527 527
     $strategy = conversions\mixed_to_value_getter($strategy);
528
-    $isValid = function ($value, $key) use ($strategy) {
528
+    $isValid = function($value, $key) use ($strategy) {
529 529
         $tempVarPhp54 = $strategy($value, $key);
530 530
         return !empty($tempVarPhp54);
531 531
     };
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
     switch (sizeof($args)) {
563 563
         case 2:
564 564
             $strategy = conversions\mixed_to_value_getter($args[0]);
565
-            $closure = function ($value, $key) use ($strategy) {
565
+            $closure = function($value, $key) use ($strategy) {
566 566
                 $tempVarPhp54 = call_user_func($strategy, $value, $key);
567 567
                 return !empty($tempVarPhp54);
568 568
             };
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
         case 3:
573 573
             $strategy = conversions\mixed_to_value_getter($args[0]);
574 574
             $userClosure = $args[1];
575
-            $closure = function ($value, $key) use ($strategy, $userClosure) {
575
+            $closure = function($value, $key) use ($strategy, $userClosure) {
576 576
                 return call_user_func($userClosure, call_user_func($strategy, $value, $key));
577 577
             };
578 578
             $iterable = conversions\mixed_to_iterator($args[2]);
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
     // http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
608 608
 
609 609
     $iterables = array_map(
610
-        function ($iterable) {
610
+        function($iterable) {
611 611
             return conversions\mixed_to_iterator($iterable);
612 612
         },
613 613
         func_get_args()
Please login to merge, or discard this patch.