Passed
Pull Request — master (#27)
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
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     public function __construct()
69 69
     {
70
-        parent::__construct(\MultipleIterator::MIT_NEED_ALL | \MultipleIterator::MIT_KEYS_NUMERIC);
70
+        parent::__construct(\MultipleIterator::MIT_NEED_ALL|\MultipleIterator::MIT_KEYS_NUMERIC);
71 71
         foreach (func_get_args() as $iterable) {
72 72
             if (!$iterable instanceof \Iterator) {
73 73
                 throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
Please login to merge, or discard this patch.
src/Zicht/Itertools/lib/SortedIterator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,13 +73,13 @@
 block discarded – undo
73 73
     public function __construct(\Closure $func, \Iterator $iterable, $reverse = false)
74 74
     {
75 75
         if ($reverse) {
76
-            $cmp = function ($a, $b) use ($func) {
76
+            $cmp = function($a, $b) use ($func) {
77 77
                 $orderA = $a['order'];
78 78
                 $orderB = $b['order'];
79 79
                 return $orderA == $orderB ? 0 : ($orderA < $orderB ? 1 : -1);
80 80
             };
81 81
         } else {
82
-            $cmp = function ($a, $b) use ($func) {
82
+            $cmp = function($a, $b) use ($func) {
83 83
                 $orderA = $a['order'];
84 84
                 $orderB = $b['order'];
85 85
                 return $orderA == $orderB ? 0 : ($orderA < $orderB ? -1 : 1);
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
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function __construct(\Closure $valueFunc /* [\Closure $keyFunc], \Iterator $iterable1, [\Iterator $iterable2, [...]] */)
80 80
     {
81
-        parent::__construct(\MultipleIterator::MIT_NEED_ALL | \MultipleIterator::MIT_KEYS_NUMERIC);
81
+        parent::__construct(\MultipleIterator::MIT_NEED_ALL|\MultipleIterator::MIT_KEYS_NUMERIC);
82 82
         $args = func_get_args();
83 83
         $argsContainsKeyFunc = $args[1] instanceof \Closure;
84 84
         $this->valueFunc = $args[0];
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         if ($argsContainsKeyFunc) {
87 87
             $this->keyFunc = $args[1];
88 88
         } else {
89
-            $this->keyFunc = function () {
89
+            $this->keyFunc = function() {
90 90
                 return $this->genericKeysToKey(func_get_args());
91 91
             };
92 92
         }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 return join(
125 125
                     ':',
126 126
                     array_map(
127
-                        function ($key) {
127
+                        function($key) {
128 128
                             return (string)$key;
129 129
                         },
130 130
                         $keys
Please login to merge, or discard this patch.
src/Zicht/Itertools/conversions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 function mixed_to_closure($closure)
70 70
 {
71 71
     if (is_null($closure)) {
72
-        return function ($value) {
72
+        return function($value) {
73 73
             return $value;
74 74
         };
75 75
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         // A \Closure is always callable, but a callable is not always a \Closure.
80 80
         // Checking within this if statement is a slight optimization, preventing an unnecessary function wrap
81 81
         if (is_callable($closure)) {
82
-            $closure = function () use ($closure) {
82
+            $closure = function() use ($closure) {
83 83
                 return call_user_func_array($closure, func_get_args());
84 84
             };
85 85
         } else {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 {
112 112
     if (is_string($strategy)) {
113 113
         $keyParts = explode('.', $strategy);
114
-        $strategy = function ($value) use ($keyParts) {
114
+        $strategy = function($value) use ($keyParts) {
115 115
             foreach ($keyParts as $keyPart) {
116 116
                 if (is_array($value) && array_key_exists($keyPart, $value)) {
117 117
                     $value = $value[$keyPart];
Please login to merge, or discard this patch.