| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function endLoop(&$loop) |
||
| 40 | { |
||
| 41 | array_pop($this->stack); |
||
| 42 | |||
| 43 | if (count($this->stack) > 0) { |
||
| 44 | // This loop was inside another loop. We persist the loop variable and assign back the parent loop |
||
| 45 | $loop = end($this->stack); |
||
| 46 | } else { |
||
| 47 | // This loop was not inside another loop. We remove the var |
||
| 48 | $loop = null; |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 65 |