| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 3 | public function render(FieldInterface $field): DOMElement |
|
| 14 | { |
||
| 15 | 3 | $helpBlock = $this->getDom()->createElement('span'); |
|
| 16 | 3 | $helpBlock->setAttribute('class', 'text-danger'); |
|
| 17 | |||
| 18 | 3 | if ($this->shouldRender($field)) { |
|
| 19 | 3 | $helpBlock = $field->hasCustomErrorMessage() |
|
| 20 | 1 | ? $this->addCustomErrorMessage($helpBlock, $field) |
|
| 21 | 2 | : $this->addErrorMessages($helpBlock, $field); |
|
| 22 | } |
||
| 23 | 3 | return $helpBlock; |
|
| 24 | } |
||
| 53 |