Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 30 | public function newLoop($items) |
|
21 | { |
||
22 | 30 | $loop = new Loop($items); |
|
23 | |||
24 | // Check stack for parent loop to register it with this loop |
||
25 | 30 | if (count($this->stack) > 0) { |
|
26 | 3 | $loop->setParentLoop(last($this->stack)); |
|
27 | 3 | } |
|
28 | |||
29 | 30 | array_push($this->stack, $loop); |
|
30 | |||
31 | 30 | return $loop; |
|
32 | } |
||
33 | |||
65 |