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