@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | function type($class, $strategy = null) |
29 | 29 | { |
30 | 30 | $strategy = conversions\mixed_to_value_getter($strategy); |
31 | - return function ($value, $key = null) use ($class, $strategy) { |
|
31 | + return function($value, $key = null) use ($class, $strategy) { |
|
32 | 32 | return $strategy($value, $key) instanceof $class; |
33 | 33 | }; |
34 | 34 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $haystack = iter\iterable($haystack)->values(); |
59 | 59 | } |
60 | 60 | $strategy = conversions\mixed_to_value_getter($strategy); |
61 | - return function ($value, $key = null) use ($haystack, $strategy, $strict) { |
|
61 | + return function($value, $key = null) use ($haystack, $strategy, $strict) { |
|
62 | 62 | return in_array($strategy($value, $key), $haystack, $strict); |
63 | 63 | }; |
64 | 64 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $haystack = iter\iterable($haystack)->values(); |
81 | 81 | } |
82 | 82 | $strategy = conversions\mixed_to_value_getter($strategy); |
83 | - return function ($value, $key = null) use ($haystack, $strategy, $strict) { |
|
83 | + return function($value, $key = null) use ($haystack, $strategy, $strict) { |
|
84 | 84 | return !in_array($strategy($value, $key), $haystack, $strict); |
85 | 85 | }; |
86 | 86 | } |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | } |
109 | 109 | $strategy = conversions\mixed_to_value_getter($strategy); |
110 | 110 | if ($strict) { |
111 | - return function ($value, $key = null) use ($expected, $strategy) { |
|
111 | + return function($value, $key = null) use ($expected, $strategy) { |
|
112 | 112 | return $expected === $strategy($value, $key); |
113 | 113 | }; |
114 | 114 | } else { |
115 | - return function ($value, $key = null) use ($expected, $strategy) { |
|
115 | + return function($value, $key = null) use ($expected, $strategy) { |
|
116 | 116 | return $expected == $strategy($value, $key); |
117 | 117 | }; |
118 | 118 | } |
@@ -67,7 +67,7 @@ |
||
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')); |
@@ -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 |