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