Passed
Push — master ( acf3f9...98cfe3 )
by Derek Stephen
03:04
created

Radio::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace Del\Form\Field;
4
5
use Del\Form\Renderer\Field\RadioRender;
6
use Del\Form\Traits\CanRenderInlineTrait;
7
use Del\Form\Traits\HasOptionsTrait;
8
9
class Radio extends FieldAbstract implements ArrayValueInterface
10
{
11
    use CanRenderInlineTrait;
12
    use HasOptionsTrait;
13
14
    /**
15
     * We end up ignoring this during rendering Radios, see the renderer for info
16
     *
17
     * @return string
18
     */
19 9
    public function getTag(): string
20
    {
21 9
        return 'div';
22
    }
23
24 12
    public function init(): void
25
    {
26 12
        $this->setRenderInline(false);
27 12
        $this->setRenderer(new RadioRender());
28
    }
29
}