| Conditions | 4 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 60 | 1 | public function getElements(): array |
|
| 61 | { |
||
| 62 | 1 | $elements = $this->wrapped->getElements(); |
|
| 63 | 1 | if ($this->getMax() > 0 || $this->getMax() === -1) { |
|
| 64 | /** |
||
| 65 | * @var string $k |
||
| 66 | */ |
||
| 67 | 1 | foreach ($elements as $k => $element) { |
|
| 68 | /** |
||
| 69 | * @var Element|ElementRef|ElementSingle|GroupRef $e |
||
| 70 | */ |
||
| 71 | 1 | $e = clone $element; |
|
| 72 | 1 | $e->setMax($this->getMax()); |
|
| 73 | 1 | $elements[$k] = $e; |
|
| 74 | } |
||
| 75 | } |
||
| 76 | |||
| 77 | 1 | return $elements; |
|
| 78 | } |
||
| 79 | |||
| 85 |