| Conditions | 4 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 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 | /** |
||
| 86 | * @var string $k |
||
| 87 | */ |
||
| 88 | 1 | foreach ($elements as $k => $element) { |
|
| 89 | /** |
||
| 90 | * @var Element|ElementRef|ElementSingle|GroupRef $e |
||
| 91 | */ |
||
| 92 | 1 | $e = clone $element; |
|
| 93 | 1 | $e->setMax($this->getMax()); |
|
| 94 | 1 | $elements[$k] = $e; |
|
| 95 | 1 | } |
|
| 96 | 1 | } |
|
| 97 | |||
| 98 | 1 | return $elements; |
|
| 99 | } |
||
| 106 |