BreadcrumbItemElement   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A active() 0 4 2
1
<?php
2
3
namespace Lagdo\UiBuilder\Element\Html;
4
5
use Lagdo\UiBuilder\Builder\Html\Element;
6
use Lagdo\UiBuilder\Element\BreadcrumbItemInterface;
7
8
class BreadcrumbItemElement extends Element implements BreadcrumbItemInterface
9
{
10
    /**
11
     * @var string
12
     */
13
    public static string $tag = 'li';
14
15
    /**
16
     * @param bool $active
17
     *
18
     * @return static
19
     */
20
    public function active(bool $active = false): static
21
    {
22
        $active && $this->addClass('active');
23
        return $this;
24
    }
25
}
26