@@ -155,7 +155,7 @@ |
||
| 155 | 155 | /** |
| 156 | 156 | * {@inheritdoc} |
| 157 | 157 | */ |
| 158 | - public function forEach(callable $consumer): void |
|
| 158 | + public function forEach (callable $consumer): void |
|
| 159 | 159 | { |
| 160 | 160 | foreach ($this->data as $value) { |
| 161 | 161 | $consumer($value); |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | * |
| 103 | 103 | * @return void |
| 104 | 104 | */ |
| 105 | - public function forEach(callable $consumer): void; |
|
| 105 | + public function forEach (callable $consumer): void; |
|
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * Get the native array value of the collection |
@@ -263,7 +263,7 @@ |
||
| 263 | 263 | /** |
| 264 | 264 | * {@inheritdoc} |
| 265 | 265 | */ |
| 266 | - public function forEach(callable $consumer): void |
|
| 266 | + public function forEach (callable $consumer): void |
|
| 267 | 267 | { |
| 268 | 268 | foreach ($this->keys as $hash => $key) { |
| 269 | 269 | $consumer($this->values[$hash], $key); |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | $stream = new ArrayStream($this->data); |
| 36 | 36 | |
| 37 | 37 | return $stream |
| 38 | - ->filter(function ($e) { return $e->id % 3 === 0; }) |
|
| 39 | - ->map(function ($e) { return $e->sub; }) |
|
| 38 | + ->filter(function($e) { return $e->id % 3 === 0; }) |
|
| 39 | + ->map(function($e) { return $e->sub; }) |
|
| 40 | 40 | ->distinct() |
| 41 | 41 | ->toArray() |
| 42 | 42 | ; |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | $stream = new MutableArrayStream($this->data); |
| 51 | 51 | |
| 52 | 52 | return $stream |
| 53 | - ->filter(function ($e) { return $e->id % 3 === 0; }) |
|
| 54 | - ->map(function ($e) { return $e->sub; }) |
|
| 53 | + ->filter(function($e) { return $e->id % 3 === 0; }) |
|
| 54 | + ->map(function($e) { return $e->sub; }) |
|
| 55 | 55 | ->distinct() |
| 56 | 56 | ->toArray() |
| 57 | 57 | ; |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | return array_unique( |
| 68 | 68 | array_map( |
| 69 | - function ($e) { return $e->sub; }, |
|
| 70 | - array_filter($array, function ($e) { return $e->id % 3 === 0; }) |
|
| 69 | + function($e) { return $e->sub; }, |
|
| 70 | + array_filter($array, function($e) { return $e->id % 3 === 0; }) |
|
| 71 | 71 | ), |
| 72 | 72 | SORT_REGULAR |
| 73 | 73 | ); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function bench_reduce_with_closure() |
| 88 | 88 | { |
| 89 | - return (new ArrayStream(range(0, 100)))->reduce(function ($a, $b) { return $a + $b; }); |
|
| 89 | + return (new ArrayStream(range(0, 100)))->reduce(function($a, $b) { return $a + $b; }); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function bench_map_getter_closure() |
| 104 | 104 | { |
| 105 | - return (new ArrayStream($this->data))->map(function ($e) { return $e->sub(); })->toArray(); |
|
| 105 | + return (new ArrayStream($this->data))->map(function($e) { return $e->sub(); })->toArray(); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | |