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