Table   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
c 1
b 0
f 1
dl 0
loc 15
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMetadata() 0 4 1
A render() 0 7 2
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\Materialize\Element;
4
5
use Formularium\Element;
6
use Formularium\HTMLNode;
7
use Formularium\Metadata;
8
use Formularium\Frontend\HTML\Element\Table as HTMLTable;
9
10
class Table extends Element
11
{
12
    public function render(array $parameters, HTMLNode $previous): HTMLNode
13
    {
14
        if ($parameters[HTMLTable::STRIPED] ?? false) {
15
            $previous->addAttribute('class', 'striped');
16
        }
17
18
        return $previous;
19
    }
20
21
    public static function getMetadata(): Metadata
22
    {
23
        $metadata = HTMLTable::getMetadata();
24
        return $metadata;
25
    }
26
}
27