@@ -73,13 +73,13 @@ |
||
| 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); |
@@ -78,7 +78,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -21,8 +21,6 @@ |
||
| 21 | 21 | * until it is exhausted, then proceeds to the next iterable, until |
| 22 | 22 | * all the iterables are exhausted. |
| 23 | 23 | * |
| 24 | - * @param array|string|\Iterator $iterable |
|
| 25 | - * @param array|string|\Iterator $iterable2 |
|
| 26 | 24 | * @return Itertools\lib\ChainIterator |
| 27 | 25 | * |
| 28 | 26 | * @see Itertools\lib\Traits\ChainTrait::chain |
@@ -26,8 +26,6 @@ |
||
| 26 | 26 | * > iter\iterable('ABC', 'DEF')->chain() |
| 27 | 27 | * A B C D E F |
| 28 | 28 | * |
| 29 | - * @param array|string|\Iterator $iterable |
|
| 30 | - * @param array|string|\Iterator $iterable2 |
|
| 31 | 29 | * @return null|ChainIterator |
| 32 | 30 | */ |
| 33 | 31 | public function chain(/* $iterable, $iterable2, ... */) |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | if ($this instanceof \Iterator) { |
| 24 | 24 | $strategy = conversions\mixed_to_value_getter($strategy); |
| 25 | - $isValid = function ($value, $key) use ($strategy) { |
|
| 25 | + $isValid = function($value, $key) use ($strategy) { |
|
| 26 | 26 | $tempVarPhp54 = $strategy($value, $key); |
| 27 | 27 | return !empty($tempVarPhp54); |
| 28 | 28 | }; |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $array = iterator_to_array($this); |
| 30 | 30 | array_walk( |
| 31 | 31 | $array, |
| 32 | - function (&$value) { |
|
| 32 | + function(&$value) { |
|
| 33 | 33 | if ($value instanceof FiniteIterableInterface) { |
| 34 | 34 | $value = $value->toArray(); |
| 35 | 35 | } |
@@ -17,9 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * Make an iterator that applies $strategy to every entry in this iterable |
| 19 | 19 | * |
| 20 | - * @param null|string|\Closure $strategy |
|
| 21 | - * @param array|string|\Iterator $iterable |
|
| 22 | - * @param array|string|\Iterator $iterable2 |
|
| 20 | + * @param \Closure $strategy |
|
| 23 | 21 | * @return Itertools\lib\MapIterator |
| 24 | 22 | * |
| 25 | 23 | * @see Itertools\lib\Traits\MapTrait::map |
@@ -17,8 +17,6 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * Returns an iterator where one or more iterables are zipped together |
| 19 | 19 | * |
| 20 | - * @param array|string|\Iterator $iterable |
|
| 21 | - * @param array|string|\Iterator $iterable2 |
|
| 22 | 20 | * @return Itertools\lib\ZipIterator |
| 23 | 21 | * |
| 24 | 22 | * @see Itertools\lib\Traits\ZipTrait::zip |
@@ -36,8 +36,6 @@ |
||
| 36 | 36 | * 2.5 3.5 4.5 |
| 37 | 37 | * |
| 38 | 38 | * @param null|string|\Closure $strategy |
| 39 | - * @param array|string|\Iterator $iterable |
|
| 40 | - * @param array|string|\Iterator $iterable2 |
|
| 41 | 39 | * @return MapIterator |
| 42 | 40 | */ |
| 43 | 41 | public function map($strategy /*, $iterable, $iterable2, ... */) |