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