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

Html::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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