Test Failed
Push — master ( 4a24c3...3a21da )
by Enjoys
02:13
created

Html   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 6
c 1
b 0
f 1
dl 0
loc 14
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A baseHtml() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Enjoys\Forms\Elements;
6
7
use Enjoys\Forms\Element;
8
9
/**
10
 * Class Html
11
 * @package Enjoys\Forms\Elements
12
 */
13
class Html extends Element
14
{
15
16 4
    public function __construct(string $title)
17
    {
18 4
        parent::__construct(\uniqid('html'), $title);
19 4
        $this->setLabel($title);
20 4
        $this->removeAttribute('name');
21 4
        $this->removeAttribute('id');
22 4
    }
23
24 1
    public function baseHtml(): string
25
    {
26 1
        return $this->getLabel() ?? '';
27
    }
28
}
29