Passed
Push — master ( d98c91...5c9a86 )
by Bruno
08:10
created

Card::getMetadata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 15
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 20
rs 9.7666
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\HTML\Element;
4
5
use Formularium\Element;
6
use Formularium\HTMLNode;
7
use Formularium\Metadata;
8
use Formularium\MetadataParameter;
9
10
class Card extends Element
11
{
12
    const IMAGE = "image";
13
    const LINK = "link";
14
    const CONTENT = "content";
15
16
    public function render(array $parameters, HTMLNode $previous): HTMLNode
17
    {
18
        return $previous;
19
    }
20
21
    public static function getMetadata(): Metadata
22
    {
23
        return new Metadata(
24
            'Table',
25
            'Creates a table',
26
            [
27
                new MetadataParameter(
28
                    static::TITLE,
29
                    'array',
30
                    'Is it disabled?'
31
                ),
32
                new MetadataParameter(
33
                    static::IMAGE,
34
                    'bool',
35
                    'Is this table striped?'
36
                ),
37
                new MetadataParameter(
38
                    static::LINK,
39
                    'bool',
40
                    'Is this table bordered?'
41
                )
42
            ]
43
        );
44
    }
45
}
46