Hidden::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 8
ccs 7
cts 7
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Del\Form\Field;
6
7
use Del\Form\Filter\Adapter\FilterAdapterZf;
8
use Laminas\Filter\StringTrim;
9
use Laminas\Filter\StripTags;
10
11
class Hidden extends FieldAbstract
12
{
13 1
    public function getTag(): string
14
    {
15 1
        return 'input';
16
    }
17
18 2
    public function init(): void
19
    {
20 2
        $this->setAttribute('type', 'hidden');
21 2
        $this->setAttribute('class', 'form-control');
22 2
        $stringTrim = new FilterAdapterZf(new StringTrim());
23 2
        $stripTags = new FilterAdapterZf(new StripTags());
24 2
        $this->addFilter($stringTrim);
25 2
        $this->addFilter($stripTags);
26
    }
27
}
28