| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 5 | public function renderBlock(FieldInterface $field, DOMElement $element): DOMElement |
|
| 15 | {
|
||
| 16 | 5 | if (!$field instanceof Select) {
|
|
| 17 | 2 | throw new InvalidArgumentException('Must be a Del\Form\Field\Select');
|
|
| 18 | } |
||
| 19 | |||
| 20 | 3 | foreach ($field->getOptions() as $value => $label) {
|
|
| 21 | 3 | $option = $this->processOption($field, $value, $label); |
|
| 22 | 3 | $element->appendChild($option); |
|
| 23 | } |
||
| 24 | |||
| 25 | 3 | return $element; |
|
| 26 | } |
||
| 42 |