Passed
Push — master ( 648548...5e4c5e )
by Bruno
08:25
created

Badge::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 4
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 8
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\Bootstrapvue\Element;
4
5
use Formularium\Element;
6
use Formularium\HTMLNode;
7
use Formularium\Frontend\HTML\Element\Badge as HTMLBadge;
8
use Formularium\Metadata;
9
10
class Badge extends Element
11
{
12
    public function render(array $parameters, HTMLNode $previous): HTMLNode
13
    {
14
        $previous->setTag('b-badge');
15
16
        $badgeMode = 'primary'; // TODO
17
        $previous->addAttribute('variant', $badgeMode);
18
19
        return $previous;
20
    }
21
22
    public static function getMetadata(): Metadata
23
    {
24
        $metadata = HTMLBadge::getMetadata();
25
        return $metadata;
26
    }
27
}
28