Conditions | 4 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
80 | 3 | public function getElements() |
|
81 | { |
||
82 | 3 | $elements = $this->wrapped->getElements(); |
|
83 | 3 | if($this->getMax()>0 || $this->getMax()===-1){ |
|
84 | 3 | foreach ($elements as $k => $element) { |
|
85 | /** |
||
86 | * @var Element|ElementRef|ElementSingle|GroupRef $e |
||
87 | */ |
||
88 | 3 | $e = clone $element; |
|
89 | 3 | $e->setMax($this->getMax()); |
|
90 | 3 | $elements[$k] = $e; |
|
91 | 1 | } |
|
92 | 1 | } |
|
93 | 3 | return $elements; |
|
94 | } |
||
115 |