Completed
Pull Request — develop (#50)
by Axel
02:57
created

BetaTestModel   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 168
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 88.68%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 18
c 1
b 0
f 1
lcom 1
cbo 1
dl 0
loc 168
ccs 47
cts 53
cp 0.8868
rs 10

18 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A setName() 0 5 1
A getName() 0 3 1
A setSlug() 0 5 1
A getSlug() 0 3 1
A setProject() 0 5 1
A getProject() 0 3 1
A setStartedAt() 0 5 1
A getStartedAt() 0 3 1
A setEndedAt() 0 5 1
A getEndedAt() 0 3 1
A setCreatedAt() 0 5 1
A getCreatedAt() 0 3 1
A setUpdatedAt() 0 5 1
A getUpdatedAt() 0 3 1
A addBetaTester() 0 5 1
A removeBetaTester() 0 5 1
A getBetaTesters() 0 3 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Model;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
7
abstract class BetaTestModel {
8
    /** @var string **/
9
    protected $name;
10
    /** @var string **/
11
    protected $slug;
12
    /** @var ProjectModel **/
13
    protected $project;
14
    /** @var \DateTime **/
15
    protected $startedAt;
16
    /** @var \DateTime **/
17
    protected $endedAt;
18
    /** @var \DateTime **/
19
    protected $createdAt;
20
    /** @var \DateTime **/
21
    protected $updatedAt;
22
    /** @var ArrayCollection **/
23
    protected $betaTesters;
24
25 1
    public function __construct() {
26
        $this->betaTesters = new ArrayCollection();
27 1
    }
28
29
    /**
30
     * @param string $name
31
     * @return BetaTestModel
32
     */
33 1
    public function setName($name) {
34 1
        $this->name = $name;
35
36 1
        return $this;
37
    }
38
39
    /**
40
     * @return string
41
     */
42 1
    public function getName() {
43 1
        return $this->name;
44
    }
45
46
    /**
47
     * @param string $slug
48
     * @return BetaTestModel
49
     */
50 1
    public function setSlug($slug) {
51 1
        $this->slug = $slug;
52
53 1
        return $this;
54
    }
55
56
    /**
57
     * @return string
58
     */
59 1
    public function getSlug() {
60 1
        return $this->slug;
61
    }
62
63
    /**
64
     * @param ProjectModel $project
65
     * @return BetaTestModel
66
     */
67 1
    public function setProject(ProjectModel $project) {
68 1
        $this->project = $project;
69
70 1
        return $this;
71 1
    }
72
73
    /**
74
     * @return ProjectModel
75
     */
76 1
    public function getProject() {
77 1
        return $this->project;
78
    }
79
80
    /**
81
     * @param \DateTime $startedAt
82
     * @return BetaTestModel
83
     */
84 1
    public function setStartedAt(\DateTime $startedAt) {
85 1
        $this->startedAt = $startedAt;
86
87 1
        return $this;
88 1
    }
89
90
    /**
91
     * @return \DateTime
92
     */
93 1
    public function getStartedAt() {
94 1
        return $this->startedAt;
95
    }
96
97
    /**
98
     * @param \DateTime $endedAt
99
     * @return BetaTestModel
100
     */
101 1
    public function setEndedAt(\DateTime $endedAt) {
102 1
        $this->endedAt = $endedAt;
103
104 1
        return $this;
105 1
    }
106
107
    /**
108
     * @return \DateTime
109
     */
110 1
    public function getEndedAt() {
111 1
        return $this->endedAt;
112
    }
113
114
    /**
115
     * @param \DateTime $createdAt
116
     * @return BetaTestModel
117
     */
118 1
    public function setCreatedAt(\DateTime $createdAt) {
119 1
        $this->createdAt = $createdAt;
120
121 1
        return $this;
122 1
    }
123
124
    /**
125
     * @return \DateTime
126
     */
127 1
    public function getCreatedAt() {
128 1
        return $this->createdAt;
129
    }
130
131
    /**
132
     * @param \DateTime $updatedAt
133
     * @return BetaTestModel
134
     */
135 1
    public function setUpdatedAt(\DateTime $updatedAt) {
136 1
        $this->updatedAt = $updatedAt;
137
138 1
        return $this;
139 1
    }
140
141
    /**
142
     * @return \DateTime
143
     */
144 1
    public function getUpdatedAt() {
145 1
        return $this->updatedAt;
146
    }
147
148
    /**
149
     * @param BetaTesterModel $betaTester
150
     * @return BetaTestModel
151
     */
152
    public function addBetaTester(BetaTesterModel $betaTester) {
153
        $this->betaTesters->add($betaTester);
154
155
        return $this;
156
    }
157
158
    /**
159
     * @param BetaTesterModel $betaTester
160
     * @return BetaTestModel
161
     */
162 1
    public function removeBetaTester(BetaTesterModel $betaTester) {
163
        $this->betaTesters->removeElement($betaTester);
164
165 1
        return $this;
166 1
    }
167
168
    /**
169
     * @return ArrayCollection
170
     */
171 1
    public function getBetaTesters() {
172 1
        return $this->betaTesters;
173
    }
174
}
175