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 |
||
81 | 1 | public function getElements() |
|
82 | { |
||
83 | 1 | $elements = $this->wrapped->getElements(); |
|
84 | 1 | if ($this->getMax() > 0 || $this->getMax() === -1) { |
|
85 | 1 | foreach ($elements as $k => $element) { |
|
86 | /** |
||
87 | * @var Element|ElementRef|ElementSingle|GroupRef $e |
||
88 | */ |
||
89 | 1 | $e = clone $element; |
|
90 | 1 | $e->setMax($this->getMax()); |
|
91 | 1 | $elements[$k] = $e; |
|
92 | 1 | } |
|
93 | 1 | } |
|
94 | |||
95 | 1 | return $elements; |
|
96 | } |
||
103 |