Passed
Pull Request — main (#3)
by Peter
07:02 queued 03:23
created

Dashboard   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Dashboard;
6
7
use AbterPhp\Framework\Constant\Html5;
8
use AbterPhp\Framework\Html\Attribute;
9
use AbterPhp\Framework\Html\Attributes;
10
use AbterPhp\Framework\Html\Component;
11
12
class Dashboard extends Component
13
{
14
    protected const DEFAULT_TAG = Html5::TAG_DIV;
15
16
    protected const CLASS_DASHBOARD = 'dashboard-container';
17
18
    public function __construct(
19
        $content = null,
20
        array $intents = [],
21
        ?Attributes $attributes = null,
22
        ?string $tag = null
23
    ) {
24
        $attributes ??= new Attributes();
25
        $attributes->mergeItem(new Attribute(Html5::ATTR_CLASS, self::CLASS_DASHBOARD));
26
27
        parent::__construct($content, $intents, $attributes, $tag);
28
    }
29
}
30