Completed
Push — develop ( fa5688...51b55d )
by Axel
8s
created

ProjectModel::getNbBetaTesters()   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
 * @ORM\Entity(repositoryClass="Developtech\AgilityBundle\Repository\ProjectRepository")
13
 * @ORM\HasLifecycleCallbacks()
14
 */
15
abstract class ProjectModel
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="id", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     */
24
    protected $id;
25
26
    /**
27
     * @var string
28
     *
29
     * @ORM\Column(name="name", type="string", length=125, unique=true)
30
     */
31
    protected $name;
32
33
    /**
34
     * @var string
35
     *
36
     * @ORM\Column(name="slug", type="string", length=125, unique=true)
37
     */
38
    protected $slug;
39
40
    /**
41
     * @var \DateTime
42
     *
43
     * @ORM\Column(name="created_at", type="datetime")
44
     */
45
    protected $createdAt;
46
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(name="nbBetaTesters", type="integer")
51
     */
52
    protected $nbBetaTesters;
53
54
    /**
55
     * @var string
56
     *
57
     * @ORM\Column(name="betaTestStatus", type="string", length=12)
58
     */
59
    protected $betaTestStatus;
60
61
    /**
62
     * @var object
63
     *
64
     * The mapping to the user class must be done by the end-user
65
     */
66
    protected $productOwner;
67
68
    /**
69
     * @var ArrayCollection
70
     *
71
     * The mapping to the features can be done by the end-user but is optionnal
72
     */
73
    protected $features;
74
75 7
    public function __construct() {
76
        $this->features = new ArrayCollection();
77 7
    }
78
79
    /**
80
     * @param integer $id
81
     * @return Project
82
     */
83 3
    public function setId($id) {
84 3
        $this->id = $id;
85
86 3
        return $this;
87
    }
88
89
    /**
90
     * @ORM\PrePersist()
91
     */
92
    public function prePersist() {
93
        $this->createdAt = new \DateTime();
94
    }
95
96
    /**
97
     * Get id
98
     *
99
     * @return int
100
     */
101 3
    public function getId()
102
    {
103 3
        return $this->id;
104
    }
105
106
    /**
107
     * Set name
108
     *
109
     * @param string $name
110
     *
111
     * @return ProjectModel
112
     */
113 3
    public function setName($name)
114
    {
115 3
        $this->name = $name;
116
117 3
        return $this;
118
    }
119
120
    /**
121
     * Get name
122
     *
123
     * @return string
124
     */
125 4
    public function getName()
126
    {
127 4
        return $this->name;
128
    }
129
130
    /**
131
     * Set slug
132
     *
133
     * @param string $slug
134
     *
135
     * @return ProjectModel
136
     */
137 3
    public function setSlug($slug)
138
    {
139 3
        $this->slug = $slug;
140
141 3
        return $this;
142
    }
143
144
    /**
145
     * Get slug
146
     *
147
     * @return string
148
     */
149 4
    public function getSlug()
150
    {
151 4
        return $this->slug;
152
    }
153
154
    /**
155
     * Set createdAt
156
     *
157
     * @param \DateTime $createdAt
158
     *
159
     * @return ProjectModel
160
     */
161 3
    public function setCreatedAt($createdAt)
162
    {
163 3
        $this->createdAt = $createdAt;
164
165 3
        return $this;
166
    }
167
168
    /**
169
     * Get createdAt
170
     *
171
     * @return \DateTime
172
     */
173 1
    public function getCreatedAt()
174
    {
175 1
        return $this->createdAt;
176
    }
177
178
    /**
179
     * Set nbBetaTesters
180
     *
181
     * @param integer $nbBetaTesters
182
     *
183
     * @return ProjectModel
184
     */
185 3
    public function setNbBetaTesters($nbBetaTesters)
186
    {
187 3
        $this->nbBetaTesters = $nbBetaTesters;
188
189 3
        return $this;
190
    }
191
192
    /**
193
     * Get nbBetaTesters
194
     *
195
     * @return int
196
     */
197 2
    public function getNbBetaTesters()
198
    {
199 2
        return $this->nbBetaTesters;
200
    }
201
202
    /**
203
     * Set betaTestStatus
204
     *
205
     * @param string $betaTestStatus
206
     *
207
     * @return ProjectModel
208
     */
209 3
    public function setBetaTestStatus($betaTestStatus)
210
    {
211 3
        $this->betaTestStatus = $betaTestStatus;
212
213 3
        return $this;
214
    }
215
216
    /**
217
     * Get betaTestStatus
218
     *
219
     * @return string
220
     */
221 2
    public function getBetaTestStatus()
222
    {
223 2
        return $this->betaTestStatus;
224
    }
225
226
    /**
227
     * Set productOwner
228
     *
229
     * @param object $productOwner
230
     *
231
     * @return ProjectModel
232
     */
233 4
    public function setProductOwner($productOwner)
234
    {
235 4
        $this->productOwner = $productOwner;
236
237 4
        return $this;
238
    }
239
240
    /**
241
     * Get productOwner
242
     *
243
     * @return object
244
     */
245 2
    public function getProductOwner()
246
    {
247 2
        return $this->productOwner;
248
    }
249
250
    /**
251
     * @param FeatureModel $feature
252
     * @return ProjectModel
253
     */
254 1
    public function addFeature(FeatureModel $feature) {
255
        $this->features->add($feature);
256
257 1
        return $this;
258 1
    }
259
260
    /**
261
     * @param FeatureModel $feature
262
     * @return ProjectModel
263
     */
264
    public function removeFeature(FeatureModel $feature) {
265
        $this->features->removeElement($feature);
266
267
        return $this;
268
    }
269
270
    /**
271
     * @param FeatureModel $feature
272
     * @return boolean
273
     */
274
    public function hasFeature(FeatureModel $feature) {
275
        return $this->features->contains($feature);
276
    }
277
278
    /**
279
     * @return ArrayCollection
280
     */
281
    public function getFeatures() {
282
        return $this->features;
283
    }
284
}
285