CheckboxOptionsBuilder::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace steevanb\SymfonyFormOptionsBuilder\OptionsBuilder;
4
5
use steevanb\SymfonyFormOptionsBuilder\Behavior\OptionAccessorsTrait;
6
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
7
8
class CheckboxOptionsBuilder extends AbstractOptionsBuilder
9
{
10
    use OptionAccessorsTrait;
11
12
    /**
13
     * @param mixed $value
14
     * @return $this
15
     * @link http://symfony.com/fr/doc/current/reference/forms/types/checkbox.html#value
16
     */
17
    public function setValue($value)
18
    {
19
        return $this->setOption('value', $value);
20
    }
21
22
    /**
23
     * @return mixed
24
     */
25
    public function getValue()
26
    {
27
        return $this->getOption('value');
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public static function getBuilderType()
34
    {
35
        return CheckboxType::class;
36
    }
37
}
38