LabelTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 32
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setLabel() 0 4 1
A getLabel() 0 4 1
A removeLabel() 0 4 1
1
<?php
2
3
namespace steevanb\SymfonyFormOptionsBuilder\Behavior;
4
5
trait LabelTrait
6
{
7
    use OptionAccessorsTrait;
8
9
    /**
10
     * @param string|false $label
11
     * @return $this
12
     * @link http://symfony.com/doc/current/reference/forms/types/form.html#label
13
     */
14
    public function setLabel($label)
15
    {
16
        return $this->setOption('label', $label);
17
    }
18
19
    /**
20
     * @return string|false
21
     * @link http://symfony.com/doc/current/reference/forms/types/form.html#label
22
     */
23
    public function getLabel()
24
    {
25
        return $this->getOption('label');
26
    }
27
28
    /**
29
     * @return $this
30
     * @link http://symfony.com/doc/current/reference/forms/types/form.html#label
31
     */
32
    public function removeLabel()
33
    {
34
        return $this->removeOption('label');
35
    }
36
}
37