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