| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 7 | public function render(ButtonViewInterface $view, array $attributes): string |
|
| 21 | { |
||
| 22 | 7 | if (!isset($attributes['type'])) { |
|
| 23 | 7 | $attributes['type'] = 'submit'; |
|
| 24 | } |
||
| 25 | |||
| 26 | 7 | $attributes['name'] = $view->name(); |
|
| 27 | 7 | $attributes['value'] = $view->value(); |
|
| 28 | |||
| 29 | 7 | $inner = $attributes['inner'] ?? null; |
|
| 30 | 7 | unset($attributes['inner']); |
|
| 31 | |||
| 32 | 7 | return HtmlRenderer::element($inner !== null ? 'button' : 'input', $attributes, $inner); |
|
| 33 | } |
||
| 49 |