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