| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 28 | 3 | private function processOption(FieldInterface $field, $value, $label): DOMElement |
|
| 29 | {
|
||
| 30 | 3 | $option = $this->createElement('option');
|
|
| 31 | 3 | $option->setAttribute('value', (string) $value);
|
|
| 32 | 3 | $label = $this->createText($label); |
|
| 33 | 3 | $option->appendChild($label); |
|
| 34 | |||
| 35 | 3 | if ($field->getValue() !== null && in_array($option->getAttribute('value'), $field->getValue())) {
|
|
| 36 | 1 | $option->setAttribute('selected', 'selected');
|
|
| 37 | } |
||
| 38 | |||
| 39 | 3 | return $option; |
|
| 40 | } |
||
| 42 |