| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 3 | private function processOption(FieldInterface $field, $value, $label) |
|
| 42 | { |
||
| 43 | 3 | $option = $this->dom->createElement('option'); |
|
| 44 | 3 | $option->setAttribute('value', $value); |
|
| 45 | 3 | $label = new DOMText($label); |
|
| 46 | 3 | $option->appendChild($label); |
|
| 47 | 3 | if($field->getValue() == $option->getAttribute('value')) { |
|
| 48 | 1 | $option->setAttribute('selected', 'selected'); |
|
| 49 | 1 | } |
|
| 50 | 3 | return $option; |
|
| 51 | } |
||
| 52 | } |