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