Completed
Push — master ( fa5688...b322d1 )
by Axel
05:31 queued 02:55
created

FeatureModel::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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