MultiSelect::init()   A
last analyzed

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 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
ccs 5
cts 5
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\Renderer\Field\MultiSelectRender;
8
use Del\Form\Traits\HasOptionsTrait;
9
10
class MultiSelect extends FieldAbstract implements ArrayValueInterface
11
{
12
    use HasOptionsTrait;
13
14 4
    public function getTag(): string
15
    {
16 4
        return 'select';
17
    }
18
19 6
    public function init(): void
20
    {
21 6
        $this->setAttribute('type', 'text');
22 6
        $this->setAttribute('multiple', '');
23 6
        $this->setAttribute('class', 'form-control');
24 6
        $this->setRenderer(new MultiSelectRender());
25
    }
26
}
27