| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 25 | public function renderFieldBlock(): DomElement |
|
| 21 | { |
||
| 22 | // Set form group div properties |
||
| 23 | 25 | $formGroup = $this->block; |
|
| 24 | 25 | $class = $formGroup->getAttribute('class').'form-group'; |
|
| 25 | 25 | $formGroup->setAttribute('class', $class); |
|
| 26 | 25 | $formGroup->setAttribute('id', $this->field->getName().'-form-group'); |
|
| 27 | |||
| 28 | 25 | $formGroup->appendChild($this->label); |
|
| 29 | |||
| 30 | 25 | $formGroup->appendChild($this->element); |
|
| 31 | |||
| 32 | 25 | if (!is_null($this->errors)) { |
|
| 33 | 3 | $formGroup->appendChild($this->errors); |
|
| 34 | } |
||
| 35 | |||
| 36 | 25 | return $formGroup; |
|
| 37 | } |
||
| 39 |