Passed
Push — master ( bb4653...2ab0f7 )
by Bruno
07:17
created

Badge::getMetadata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\Bootstrap\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
        $badgeMode = 'badge-primary'; // TODO
15
        $previous->addAttribute('class', "badge $badgeMode");
16
        return $previous;
17
    }
18
19
    public static function getMetadata(): Metadata
20
    {
21
        $metadata = HTMLBadge::getMetadata();
22
        return $metadata;
23
    }
24
}
25