Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | $this->ensureCommandIsIterable($command); |
||
25 | $items = iterator_to_array($command, true); |
||
26 | $res = array_map(function ($item) { |
||
27 | return $this->handle($item); |
||
28 | }, $items); |
||
29 | |||
30 | return new ArrayCollection($res); |
||
31 | } |
||
32 | |||
33 | private function handle($item) |
||
34 | { |
||
35 | $handler = $this->handler; |
||
36 | if (is_callable($handler)) { |
||
37 | return $handler($item); |
||
58 |