Completed
Push — master ( cd6d5c...fa5688 )
by Axel
05:46 queued 03:12
created

FeatureModel::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Model;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Project
9
 *
10
 * @ORM\Entity(repositoryClass="Developtech\AgilityBundle\Repository\FeatureRepository")
11
 * @ORM\HasLifecycleCallbacks()
12
 */
13
abstract class FeatureModel {
14
    /**
15
     * @var integer
16
     *
17
     * @ORM\Id
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     * @ORM\Column(type="integer")
20
     */
21
    protected $id;
22
23
    /**
24
     * @var string
25
     *
26
     * @ORM\Column(type="string", length=255)
27
     */
28
    protected $name;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(type="string", length=255)
34
     */
35
    protected $slug;
36
37
    /**
38
     * @var string
39
     *
40
     * @ORM\Column(type="string", length=255, nullable=true)
41
     */
42
    protected $description;
43
44
    /**
45
     * @var ProjectModel
46
     *
47
     * This field must be mapped by the end-user
48
     */
49
    protected $project;
50
51
    /**
52
     * @var integer
53
     *
54
     * @ORM\Column(type="integer", nullable=true)
55
     */
56
    protected $productOwnerValue;
57
58
    /**
59
     * @var integer
60
     *
61
     * @ORM\Column(type="integer", nullable=true)
62
     */
63
    protected $userValue;
64
65
    /**
66
     * @var \DateTime
67
     *
68
     * @ORM\Column(type="datetime")
69
     */
70
    protected $createdAt;
71
72
    /**
73
     * @var \DateTime
74
     *
75
     * @ORM\Column(type="datetime")
76
     */
77
    protected $updatedAt;
78
79
    /**
80
     * @var integer
81
     *
82
     * @ORM\Column(type="integer")
83
     */
84
    protected $status;
85
86
    /**
87
     * @var object
88
     *
89
     * This field must be mapped by the end-user
90
     */
91
    protected $developer;
92
93
    const STATUS_TO_SPECIFY = 0;
94
    const STATUS_TO_VALORIZE = 1;
95
    const STATUS_READY = 2;
96
    const STATUS_TO_DO = 3;
97
    const STATUS_IN_PROGRESS = 4;
98
    const STATUS_TO_VALIDATE = 5;
99
    const STATUS_TO_DEPLOY = 6;
100
101
    /**
102
     * @ORM\PrePersist()
103
     */
104
    public function prePersist() {
105
        $this->createdAt = $this->updatedAt = new \DateTime();
106
    }
107
108
    /**
109
     * @ORM\PreUpdate()
110
     */
111
    public function preUpdate() {
112
        $this->updatedAt = new \DateTime();
113
    }
114
115
    /**
116
     * @param integer $id
117
     * @return FeatureModel
118
     */
119 3
    public function setId($id) {
120 3
        $this->id = $id;
121
122 3
        return $this;
123
    }
124
125
    /**
126
     * @return integer
127
     */
128 3
    public function getId() {
129 3
        return $this->id;
130
    }
131
132
    /**
133
     * @param string $name
134
     * @return FeatureModel
135
     */
136 3
    public function setName($name) {
137 3
        $this->name = $name;
138
139 3
        return $this;
140
    }
141
142
    /**
143
     * @return string
144
     */
145 2
    public function getName() {
146 2
        return $this->name;
147
    }
148
149
    /**
150
     * @param string $slug
151
     * @return FeatureModel
152
     */
153 3
    public function setSlug($slug) {
154 3
        $this->slug = $slug;
155
156 3
        return $this;
157
    }
158
159
    /**
160
     * @return string
161
     */
162 1
    public function getSlug() {
163 1
        return $this->slug;
164
    }
165
166
    /**
167
     * @param string $description
168
     * @return FeatureModel
169
     */
170 3
    public function setDescription($description) {
171 3
        $this->description = $description;
172
173 3
        return $this;
174
    }
175
176
    /**
177
     * @return string
178
     */
179 1
    public function getDescription() {
180 1
        return $this->description;
181
    }
182
183
    /**
184
     * @param ProjectModel $project
185
     * @return FeatureModel
186
     */
187 3
    public function setProject(ProjectModel $project) {
188 3
        $this->project = $project;
189
190 3
        return $this;
191
    }
192
193
    /**
194
     * @return FeatureModel
195
     */
196 1
    public function getProject() {
197 1
        return $this->project;
198
    }
199
200
    /**
201
     * @param integer $productOwnerValue
202
     * @return FeatureModel
203
     */
204 1
    public function setProductOwnerValue($productOwnerValue) {
205 1
        $this->productOwnerValue = $productOwnerValue;
206
207 1
        return $this;
208
    }
209
210
    /**
211
     * @return integer
212
     */
213 1
    public function getProductOwnerValue() {
214 1
        return $this->productOwnerValue;
215
    }
216
217
    /**
218
     * @var integer $userValue
219
     * @return FeatureModel
220
     */
221 1
    public function setUserValue($userValue) {
222 1
        $this->userValue = $userValue;
223
224 1
        return $this;
225
    }
226
227
    /**
228
     * @return integer
229
     */
230 1
    public function getUserValue() {
231 1
        return $this->userValue;
232
    }
233
234
    /**
235
     * @param integer $status
236
     * @return FeatureModel
237
     */
238 1
    public function setStatus($status) {
239 1
        $this->status = $status;
240
241 1
        return $this;
242
    }
243
244
    /**
245
     * @return integer
246
     */
247 1
    public function getStatus() {
248 1
        return $this->status;
249
    }
250
251
    /**
252
     * @param object $developer
253
     * @return FeatureModel
254
     */
255 3
    public function setDeveloper($developer) {
256 3
        $this->developer = $developer;
257
258 3
        return $this;
259
    }
260
261
    /**
262
     * @return object
263
     */
264 1
    public function getDeveloper() {
265 1
        return $this->developer;
266
    }
267
268
269
    /**
270
     * Set createdAt
271
     *
272
     * @param \DateTime $createdAt
273
     *
274
     * @return ProjectModel
275
     */
276 3
    public function setCreatedAt($createdAt)
277
    {
278 3
        $this->createdAt = $createdAt;
279
280 3
        return $this;
281
    }
282
283
    /**
284
     * Get createdAt
285
     *
286
     * @return \DateTime
287
     */
288 1
    public function getCreatedAt()
289
    {
290 1
        return $this->createdAt;
291
    }
292
293
    /**
294
     * Set updatedAt
295
     *
296
     * @param \DateTime $updatedAt
297
     *
298
     * @return ProjectModel
299
     */
300 3
    public function setUpdatedAt($updatedAt)
301
    {
302 3
        $this->updatedAt = $updatedAt;
303
304 3
        return $this;
305
    }
306
307
    /**
308
     * Get updatedAt
309
     *
310
     * @return \DateTime
311
     */
312 1
    public function getUpdatedAt()
313
    {
314 1
        return $this->updatedAt;
315
    }
316
}
317