Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
71 | 9 | public function next() |
|
72 | { |
||
73 | 9 | $this->iterable->next(); |
|
74 | 9 | if ($this->iterable->valid()) { |
|
75 | // must assign $this->func to $func before calling the closure |
||
76 | // because otherwise it will try fo find a method called func, |
||
77 | // which doesn't exist |
||
78 | 9 | $func = $this->func; |
|
79 | 9 | $this->value = $func($this->value, $this->iterable->current()); |
|
80 | } |
||
81 | 9 | } |
|
82 | |||
91 |