| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 6 | public function add(array $elements = []): Group |
|
| 29 | { |
||
| 30 | 6 | foreach ($elements as $element) { |
|
| 31 | /** @psalm-suppress RedundantConditionGivenDocblockType */ |
||
| 32 | 6 | Assert::isInstanceOf($element, Element::class); |
|
| 33 | 5 | $element->setForm($this->getForm()); |
|
| 34 | 5 | $this->addElement($element); |
|
| 35 | } |
||
| 36 | 5 | return $this; |
|
| 37 | } |
||
| 56 |