| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class FlattenOperation implements FullSetOperation |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | 4 | public function apply(\Iterator $set) |
|
| 23 | { |
||
| 24 | 4 | $result = new \ArrayIterator(); |
|
| 25 | |||
| 26 | 4 | $this->flatten($result, $set); |
|
| 27 | |||
| 28 | 4 | return $result; |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param \ArrayIterator $result |
||
| 33 | * @param mixed|mixed[] $input |
||
| 34 | */ |
||
| 35 | 4 | private function flatten(\ArrayIterator $result, $input) |
|
| 48 | 3 | } |
|
| 49 | } |
||
| 50 |