Option   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 101
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 1 Features 1
Metric Value
wmc 7
c 4
b 1
f 1
lcom 0
cbo 0
dl 0
loc 101
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A getValue() 0 4 1
A setValue() 0 6 1
A setDefinition() 0 6 1
A getDefinition() 0 4 1
1
<?php
2
3
namespace Padam87\AttributeBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="attribute_option")
10
 */
11
class Option
12
{
13
    /**
14
     * @var int
15
     *
16
     * @ORM\Id
17
     * @ORM\Column(type="integer")
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     */
20
    protected $id;
21
22
    /**
23
     * @var string
24
     *
25
     * @ORM\Column(type="string", length=255)
26
     */
27
    protected $name;
28
29
    /**
30
     * @var string
31
     *
32
     * @ORM\Column(type="string", length=255)
33
     */
34
    protected $value;
35
36
    /**
37
     * @var Definition
38
     *
39
     * @ORM\ManyToOne(targetEntity="Definition", inversedBy="options")
40
     * @ORM\JoinColumn(name="definition_id", referencedColumnName="id")
41
     */
42
    protected $definition;
43
44
    /**
45
     * @return integer
46
     */
47
    public function getId()
48
    {
49
        return $this->id;
50
    }
51
52
    /**
53
     * @param string $name
54
     *
55
     * @return $this
56
     */
57
    public function setName($name)
58
    {
59
        $this->name = $name;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getName()
68
    {
69
        return $this->name;
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    public function getValue()
76
    {
77
        return $this->value;
78
    }
79
80
    /**
81
     * @param string $value
82
     *
83
     * @return $this
84
     */
85
    public function setValue($value)
86
    {
87
        $this->value = $value;
88
89
        return $this;
90
    }
91
92
    /**
93
     * @param Definition $definition
94
     *
95
     * @return $this
96
     */
97
    public function setDefinition(Definition $definition = null)
98
    {
99
        $this->definition = $definition;
100
101
        return $this;
102
    }
103
104
    /**
105
     * @return Definition
106
     */
107
    public function getDefinition()
108
    {
109
        return $this->definition;
110
    }
111
}
112