CheckboxOptionsBuilder   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setValue() 0 4 1
A getValue() 0 4 1
A getBuilderType() 0 4 1
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