Completed
Pull Request — develop (#39)
by Axel
03:13
created

FeatureModel::getId()   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
abstract class FeatureModel {
6
    /** @var string */
7
    protected $type;
8
    /** @var string */
9
    protected $name;
10
    /** @var string */
11
    protected $slug;
12
    /** @var string*/
13
    protected $description;
14
    /** @var integer */
15
    protected $productOwnerValue;
16
    /** @var integer*/
17
    protected $userValue;
18
    /** @var \DateTime*/
19
    protected $createdAt;
20
    /** @var \DateTime */
21
    protected $updatedAt;
22
    /** @var integer */
23
    protected $status;
24
25
    /**
26
     * @var ProjectModel
27
     *
28
     * This field must be mapped by the end-user
29
     */
30
    protected $project;
31
32
    /**
33
     * @var object
34
     *
35
     * This field must be mapped by the end-user
36
     */
37
    protected $developer;
38
39
    const STATUS_TO_SPECIFY = 0;
40
    const STATUS_TO_VALORIZE = 1;
41
    const STATUS_READY = 2;
42
    const STATUS_TO_DO = 3;
43
    const STATUS_IN_PROGRESS = 4;
44
    const STATUS_TO_VALIDATE = 5;
45
    const STATUS_TO_DEPLOY = 6;
46
47
    /**
48
     * @param string $type
49
     * @return FeatureModel
50
     */
51 2
    public function setType($type) {
52 2
        $this->type = $type;
53
54 2
        return $this;
55
    }
56
57
    /**
58
     * @return string
59
     */
60 1
    public function getType() {
61 1
        return $this->type;
62
    }
63
64
    /**
65
     * @param string $name
66
     * @return FeatureModel
67
     */
68 3
    public function setName($name) {
69 3
        $this->name = $name;
70
71 3
        return $this;
72
    }
73
74
    /**
75
     * @return string
76
     */
77 3
    public function getName() {
78 3
        return $this->name;
79
    }
80
81
    /**
82
     * @param string $slug
83
     * @return FeatureModel
84
     */
85 3
    public function setSlug($slug) {
86 3
        $this->slug = $slug;
87
88 3
        return $this;
89
    }
90
91
    /**
92
     * @return string
93
     */
94 2
    public function getSlug() {
95 2
        return $this->slug;
96
    }
97
98
    /**
99
     * @param string $description
100
     * @return FeatureModel
101
     */
102 3
    public function setDescription($description) {
103 3
        $this->description = $description;
104
105 3
        return $this;
106
    }
107
108
    /**
109
     * @return string
110
     */
111 2
    public function getDescription() {
112 2
        return $this->description;
113
    }
114
115
    /**
116
     * @param ProjectModel $project
117
     * @return FeatureModel
118
     */
119 3
    public function setProject(ProjectModel $project) {
120 3
        $this->project = $project;
121
122 3
        return $this;
123 3
    }
124
125
    /**
126
     * @return FeatureModel
127
     */
128 2
    public function getProject() {
129 2
        return $this->project;
130
    }
131
132
    /**
133
     * @param integer $productOwnerValue
134
     * @return FeatureModel
135
     */
136 2
    public function setProductOwnerValue($productOwnerValue) {
137 2
        $this->productOwnerValue = $productOwnerValue;
138
139 2
        return $this;
140
    }
141
142
    /**
143
     * @return integer
144
     */
145 2
    public function getProductOwnerValue() {
146 2
        return $this->productOwnerValue;
147
    }
148
149
    /**
150
     * @var integer $userValue
151
     * @return FeatureModel
152
     */
153 1
    public function setUserValue($userValue) {
154 1
        $this->userValue = $userValue;
155
156 1
        return $this;
157
    }
158
159
    /**
160
     * @return integer
161
     */
162 1
    public function getUserValue() {
163 1
        return $this->userValue;
164
    }
165
166
    /**
167
     * @param integer $status
168
     * @return FeatureModel
169
     */
170 2
    public function setStatus($status) {
171 2
        $this->status = $status;
172
173 2
        return $this;
174
    }
175
176
    /**
177
     * @return integer
178
     */
179 2
    public function getStatus() {
180 2
        return $this->status;
181
    }
182
183
    /**
184
     * @param object $developer
185
     * @return FeatureModel
186
     */
187 3
    public function setDeveloper($developer) {
188 3
        $this->developer = $developer;
189
190 3
        return $this;
191
    }
192
193
    /**
194
     * @return object
195
     */
196 1
    public function getDeveloper() {
197 1
        return $this->developer;
198
    }
199
200
201
    /**
202
     * Set createdAt
203
     *
204
     * @param \DateTime $createdAt
205
     *
206
     * @return ProjectModel
207
     */
208 2
    public function setCreatedAt($createdAt)
209
    {
210 2
        $this->createdAt = $createdAt;
0 ignored issues
show
Documentation Bug introduced by
It seems like $createdAt of type object<DateTime> is incompatible with the declared type object<DateTime*/> of property $createdAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
211
212 2
        return $this;
213
    }
214
215
    /**
216
     * Get createdAt
217
     *
218
     * @return \DateTime
219
     */
220 1
    public function getCreatedAt()
221
    {
222 1
        return $this->createdAt;
223
    }
224
225
    /**
226
     * Set updatedAt
227
     *
228
     * @param \DateTime $updatedAt
229
     *
230
     * @return ProjectModel
231
     */
232 2
    public function setUpdatedAt($updatedAt)
233
    {
234 2
        $this->updatedAt = $updatedAt;
235
236 2
        return $this;
237
    }
238
239
    /**
240
     * Get updatedAt
241
     *
242
     * @return \DateTime
243
     */
244 1
    public function getUpdatedAt()
245
    {
246 1
        return $this->updatedAt;
247
    }
248
}
249