Completed
Pull Request — develop (#39)
by Axel
14:01 queued 11:18
created

ProjectModel::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
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
use Doctrine\Common\Collections\ArrayCollection;
8
9
/**
10
 * Project
11
 */
12
abstract class ProjectModel
13
{
14
    /** @var string */
15
    protected $name;
16
    /** @var string */
17
    protected $slug;
18
    /** @var string **/
19
    protected $description;
20
    /** @var \DateTime */
21
    protected $createdAt;
22
    /** @var int */
23
    protected $nbBetaTesters;
24
    /** @var string */
25
    protected $betaTestStatus;
26
    /**
27
     * @var object
28
     *
29
     * The mapping to the user class must be done by the end-user
30
     */
31
    protected $productOwner;
32
33
    /**
34
     * @var ArrayCollection
35
     *
36
     * The mapping to the features can be done by the end-user but is optionnal
37
     */
38
    protected $features;
39
40
    /**
41
     * @var ArrayCollection
42
     *
43
     * The mapping to the feedbacks can be done by the end-user but is optionnal
44
     */
45
    protected $feedbacks;
46
47 15
    public function __construct() {
48 15
        $this->features = new ArrayCollection();
49 15
        $this->feedbacks = new ArrayCollection();
50 15
    }
51
52
    /**
53
     * Set name
54
     *
55
     * @param string $name
56
     *
57
     * @return ProjectModel
58
     */
59 5
    public function setName($name)
60
    {
61 5
        $this->name = $name;
62
63 5
        return $this;
64
    }
65
66
    /**
67
     * Get name
68
     *
69
     * @return string
70
     */
71 4
    public function getName()
72
    {
73 4
        return $this->name;
74
    }
75
76
    /**
77
     * Set slug
78
     *
79
     * @param string $slug
80
     *
81
     * @return ProjectModel
82
     */
83 5
    public function setSlug($slug)
84
    {
85 5
        $this->slug = $slug;
86
87 5
        return $this;
88
    }
89
90
    /**
91
     * Get slug
92
     *
93
     * @return string
94
     */
95 4
    public function getSlug()
96
    {
97 4
        return $this->slug;
98
    }
99
100
    /**
101
     * @param string $description
102
     * @return ProjectModel
103
     */
104
    public function setDescription($description) {
105
        $this->description = $description;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @return string
112
     */
113
    public function getDescription() {
114
        return $this->description;
115
    }
116
117
    /**
118
     * Set createdAt
119
     *
120
     * @param \DateTime $createdAt
121
     *
122
     * @return ProjectModel
123
     */
124 4
    public function setCreatedAt($createdAt)
125
    {
126 4
        $this->createdAt = $createdAt;
127
128 4
        return $this;
129
    }
130
131
    /**
132
     * Get createdAt
133
     *
134
     * @return \DateTime
135
     */
136 1
    public function getCreatedAt()
137
    {
138 1
        return $this->createdAt;
139
    }
140
141
    /**
142
     * Set updatedAt
143
     *
144
     * @param \DateTime $updatedAt
145
     *
146
     * @return ProjectModel
147
     */
148
    public function setUpdatedAt($updatedAt)
149
    {
150
        $this->updatedAt = $updatedAt;
0 ignored issues
show
Bug introduced by
The property updatedAt does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
151
152
        return $this;
153
    }
154
155
    /**
156
     * Get updatedAt
157
     *
158
     * @return \DateTime
159
     */
160
    public function getUpdatedAt()
161
    {
162
        return $this->updatedAt;
163
    }
164
165
    /**
166
     * Set nbBetaTesters
167
     *
168
     * @param integer $nbBetaTesters
169
     *
170
     * @return ProjectModel
171
     */
172 5
    public function setNbBetaTesters($nbBetaTesters)
173
    {
174 5
        $this->nbBetaTesters = $nbBetaTesters;
175
176 5
        return $this;
177
    }
178
179
    /**
180
     * Get nbBetaTesters
181
     *
182
     * @return int
183
     */
184 2
    public function getNbBetaTesters()
185
    {
186 2
        return $this->nbBetaTesters;
187
    }
188
189
    /**
190
     * Set betaTestStatus
191
     *
192
     * @param string $betaTestStatus
193
     *
194
     * @return ProjectModel
195
     */
196 5
    public function setBetaTestStatus($betaTestStatus)
197
    {
198 5
        $this->betaTestStatus = $betaTestStatus;
199
200 5
        return $this;
201
    }
202
203
    /**
204
     * Get betaTestStatus
205
     *
206
     * @return string
207
     */
208 2
    public function getBetaTestStatus()
209
    {
210 2
        return $this->betaTestStatus;
211
    }
212
213
    /**
214
     * Set productOwner
215
     *
216
     * @param object $productOwner
217
     *
218
     * @return ProjectModel
219
     */
220 4
    public function setProductOwner($productOwner)
221
    {
222 4
        $this->productOwner = $productOwner;
223
224 4
        return $this;
225
    }
226
227
    /**
228
     * Get productOwner
229
     *
230
     * @return object
231
     */
232 2
    public function getProductOwner()
233
    {
234 2
        return $this->productOwner;
235
    }
236
237
    /**
238
     * @param FeatureModel $feature
239
     * @return ProjectModel
240
     */
241 2
    public function addFeature(FeatureModel $feature) {
242 2
        $this->features->add($feature);
243
244 2
        return $this;
245
    }
246
247
    /**
248
     * @param FeatureModel $feature
249
     * @return ProjectModel
250
     */
251 1
    public function removeFeature(FeatureModel $feature) {
252 1
        $this->features->removeElement($feature);
253
254 1
        return $this;
255
    }
256
257
    /**
258
     * @param FeatureModel $feature
259
     * @return boolean
260
     */
261 1
    public function hasFeature(FeatureModel $feature) {
262 1
        return $this->features->contains($feature);
263
    }
264
265
    /**
266
     * @return ArrayCollection
267
     */
268 1
    public function getFeatures() {
269 1
        return $this->features;
270
    }
271
272
    /**
273
     * @param FeedbackModel $feedback
274
     * @return ProjectModel
275
     */
276 1
    public function addFeedback(FeedbackModel $feedback) {
277 1
        $this->feedbacks->add($feedback);
278
279 1
        return $this;
280
    }
281
282
    /**
283
     * @param FeedbackModel $feedback
284
     * @return ProjectModel
285
     */
286 1
    public function removeFeedback(FeedbackModel $feedback) {
287 1
        $this->feedbacks->removeElement($feedback);
288
289 1
        return $this;
290
    }
291
292
    /**
293
     * @param FeedbackModel $feedback
294
     * @return boolean
295
     */
296 1
    public function hasFeedback(FeedbackModel $feedback) {
297 1
        return $this->feedbacks->contains($feedback);
298
    }
299
300
    /**
301
     * @return ArrayCollection
302
     */
303 1
    public function getFeedbacks() {
304 1
        return $this->feedbacks;
305
    }
306
}
307