Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
39 | 30 | public function endLoop(&$loop) |
|
40 | { |
||
41 | 30 | array_pop($this->stack); |
|
42 | |||
43 | 30 | 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 | 30 | $loop = null; |
|
49 | } |
||
50 | 30 | } |
|
51 | |||
65 |