| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | class Upload extends Element |
||
| 11 | { |
||
| 12 | public function render(array $parameters, HTMLNode $previous): HTMLNode |
||
| 13 | { |
||
| 14 | $previous->addAttribute('class', 'custom-file'); |
||
| 15 | /** |
||
| 16 | * @var HTMLNode $input |
||
| 17 | */ |
||
| 18 | $input = $previous->get('input')[0]; |
||
| 19 | $input->addAttribute('class', 'custom-file-input'); |
||
| 20 | $label = $previous->get('label')[0]; |
||
| 21 | $label->addAttribute('class', 'custom-file-label'); |
||
| 22 | |||
| 23 | return $previous; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function getMetadata(): Metadata |
||
| 30 | } |
||
| 31 | } |
||
| 32 |