Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
42 | public function toTarget(AddingIterator $target): AddingIterator |
||
43 | { |
||
44 | $this->origin->rewind(); |
||
45 | while ($this->origin->valid()) { |
||
46 | $target = (new ValidTernary( |
||
47 | $this->origin, |
||
48 | function (Iterator $source) use ($target) { |
||
49 | $target = $target->from($source); |
||
50 | $source->next(); |
||
51 | return $target; |
||
52 | }, |
||
53 | fn () => $target |
||
54 | ))->value(); |
||
55 | } |
||
56 | return $target; |
||
57 | } |
||
59 |