Completed
Pull Request — master (#375)
by Paul
06:22
created

Criteria   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 132
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 9
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 132
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A getName() 0 4 1
A setName() 0 4 1
A setOperator() 0 6 1
A getOperator() 0 4 1
A setValue() 0 6 1
A getValue() 0 4 1
A getWidget() 0 4 1
A setWidget() 0 4 1
1
<?php
2
3
namespace Victoire\Bundle\CriteriaBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Victoire\Bundle\WidgetBundle\Entity\Widget;
7
8
/**
9
 * Criteria
10
 *
11
 * @ORM\Table("vic_criteria")
12
 * @ORM\Entity
13
 */
14
class Criteria
15
{
16
    /**
17
     * @var integer
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    private $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="name", type="string", length=255)
29
     */
30
    private $name;
31
32
    /**
33
     * @var string
34
     *
35
     * @ORM\Column(name="operator", type="string", length=25)
36
     */
37
    private $operator;
38
39
    /**
40
     * @var string
41
     *
42
     * @ORM\Column(name="value", type="string", length=255)
43
     */
44
    private $value;
45
46
    /**
47
     * @var Widget
48
     *
49
     * @ORM\ManyToOne(targetEntity="\Victoire\Bundle\WidgetBundle\Entity\Widget", inversedBy="criterias")
50
     * @ORM\JoinColumn(name="widget_id", referencedColumnName="id", onDelete="CASCADE")
51
     */
52
    protected $widget;
53
54
    /**
55
     * Get id
56
     *
57
     * @return integer
58
     */
59
    public function getId()
60
    {
61
        return $this->id;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getName()
68
    {
69
        return $this->name;
70
    }
71
72
    /**
73
     * @param string $name
74
     */
75
    public function setName($name)
76
    {
77
        $this->name = $name;
78
    }
79
80
81
    /**
82
     * Set operand
83
     *
84
     * @param string $operator
85
     *
86
     * @return Criteria
87
     */
88
    public function setOperator($operator)
89
    {
90
        $this->operator = $operator;
91
92
        return $this;
93
    }
94
95
    /**
96
     * Get operand
97
     *
98
     * @return string
99
     */
100
    public function getOperator()
101
    {
102
        return $this->operator;
103
    }
104
105
    /**
106
     * Set value
107
     *
108
     * @param string $value
109
     *
110
     * @return Criteria
111
     */
112
    public function setValue($value)
113
    {
114
        $this->value = $value;
115
116
        return $this;
117
    }
118
119
    /**
120
     * Get value
121
     *
122
     * @return string
123
     */
124
    public function getValue()
125
    {
126
        return $this->value;
127
    }
128
129
    /**
130
     * @return Widget
131
     */
132
    public function getWidget()
133
    {
134
        return $this->widget;
135
    }
136
137
    /**
138
     * @param Widget $widget
139
     */
140
    public function setWidget($widget)
141
    {
142
        $this->widget = $widget;
143
    }
144
145
}
146
147