1
|
|
|
<?php |
2
|
|
|
namespace Torakel\DatabaseBundle\Entity; |
3
|
|
|
|
4
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* @ORM\Entity |
9
|
|
|
* @ORM\HasLifecycleCallbacks |
10
|
|
|
* @ORM\Entity(repositoryClass="Torakel\DatabaseBundle\Repository\MatchdayRepository") |
11
|
|
|
* @ORM\Table(name="matchday") |
12
|
|
|
*/ |
13
|
|
|
class Matchday |
14
|
|
|
{ |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* @var integer |
18
|
|
|
* @ORM\Column(type="integer") |
19
|
|
|
* @ORM\Id |
20
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
21
|
|
|
*/ |
22
|
|
|
private $id; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
* @ORM\Column(type="string") |
27
|
|
|
*/ |
28
|
|
|
protected $slug; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
* @ORM\Column(type="string") |
33
|
|
|
*/ |
34
|
|
|
protected $name; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Round |
38
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Round", inversedBy="matchdays") |
39
|
|
|
* @ORM\JoinColumn(name="round_id", referencedColumnName="id") |
40
|
|
|
*/ |
41
|
|
|
protected $round; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Round |
45
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Group", inversedBy="matchdays") |
46
|
|
|
* @ORM\JoinColumn(name="group_id", referencedColumnName="id") |
47
|
|
|
*/ |
48
|
|
|
protected $group; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var \Torakel\DatabaseBundle\Entity\MatchdayTable |
52
|
|
|
* @ORM\OneToOne(targetEntity="\Torakel\DatabaseBundle\Entity\MatchdayTable", mappedBy="matchday") |
53
|
|
|
*/ |
54
|
|
|
protected $matchdayTable; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
58
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\Game", mappedBy="matchday") |
59
|
|
|
*/ |
60
|
|
|
protected $games; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var integer |
64
|
|
|
* @ORM\Column(type="integer") |
65
|
|
|
*/ |
66
|
|
|
protected $position; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @var \DateTime |
70
|
|
|
* @ORM\Column(type="datetime", name="created_at") |
71
|
|
|
*/ |
72
|
|
|
protected $createdAt; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @var \DateTime |
76
|
|
|
* @ORM\Column(type="datetime", name="updated_at", nullable=true) |
77
|
|
|
*/ |
78
|
|
|
protected $updatedAt; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* Constructor |
82
|
|
|
*/ |
83
|
6 |
|
public function __construct() |
84
|
|
|
{ |
85
|
6 |
|
$this->games = new \Doctrine\Common\Collections\ArrayCollection(); |
86
|
6 |
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Get id |
90
|
|
|
* |
91
|
|
|
* @return integer |
92
|
|
|
*/ |
93
|
1 |
|
public function getId() |
94
|
|
|
{ |
95
|
1 |
|
return $this->id; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* Set slug |
100
|
|
|
* |
101
|
|
|
* @param string $slug |
102
|
|
|
* |
103
|
|
|
* @return Matchday |
104
|
|
|
*/ |
105
|
1 |
|
public function setSlug($slug) |
106
|
|
|
{ |
107
|
1 |
|
$this->slug = $slug; |
108
|
|
|
|
109
|
1 |
|
return $this; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* Get slug |
114
|
|
|
* |
115
|
|
|
* @return string |
116
|
|
|
*/ |
117
|
1 |
|
public function getSlug() |
118
|
|
|
{ |
119
|
1 |
|
return $this->slug; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* Set name |
124
|
|
|
* |
125
|
|
|
* @param string $name |
126
|
|
|
* |
127
|
|
|
* @return Matchday |
128
|
|
|
*/ |
129
|
1 |
|
public function setName($name) |
130
|
|
|
{ |
131
|
1 |
|
$this->name = $name; |
132
|
|
|
|
133
|
1 |
|
return $this; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* Get name |
138
|
|
|
* |
139
|
|
|
* @return string |
140
|
|
|
*/ |
141
|
1 |
|
public function getName() |
142
|
|
|
{ |
143
|
1 |
|
return $this->name; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* Set position |
148
|
|
|
* |
149
|
|
|
* @param integer $position |
150
|
|
|
* |
151
|
|
|
* @return Matchday |
152
|
|
|
*/ |
153
|
1 |
|
public function setPosition($position) |
154
|
|
|
{ |
155
|
1 |
|
$this->position = $position; |
156
|
|
|
|
157
|
1 |
|
return $this; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* Get position |
162
|
|
|
* |
163
|
|
|
* @return integer |
164
|
|
|
*/ |
165
|
1 |
|
public function getPosition() |
166
|
|
|
{ |
167
|
1 |
|
return $this->position; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* Set createdAt |
172
|
|
|
* |
173
|
|
|
* @param \DateTime $createdAt |
174
|
|
|
* |
175
|
|
|
* @return Matchday |
176
|
|
|
*/ |
177
|
1 |
|
public function setCreatedAt($createdAt) |
178
|
|
|
{ |
179
|
1 |
|
$this->createdAt = $createdAt; |
180
|
|
|
|
181
|
1 |
|
return $this; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* Get createdAt |
186
|
|
|
* |
187
|
|
|
* @return \DateTime |
188
|
|
|
*/ |
189
|
1 |
|
public function getCreatedAt() |
190
|
|
|
{ |
191
|
1 |
|
return $this->createdAt; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* Set updatedAt |
196
|
|
|
* |
197
|
|
|
* @param \DateTime $updatedAt |
198
|
|
|
* |
199
|
|
|
* @return Matchday |
200
|
|
|
*/ |
201
|
1 |
|
public function setUpdatedAt($updatedAt) |
202
|
|
|
{ |
203
|
1 |
|
$this->updatedAt = $updatedAt; |
204
|
|
|
|
205
|
1 |
|
return $this; |
206
|
|
|
} |
207
|
|
|
|
208
|
|
|
/** |
209
|
|
|
* Get updatedAt |
210
|
|
|
* |
211
|
|
|
* @return \DateTime |
212
|
|
|
*/ |
213
|
1 |
|
public function getUpdatedAt() |
214
|
|
|
{ |
215
|
1 |
|
return $this->updatedAt; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* Set round |
220
|
|
|
* |
221
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Round $round |
222
|
|
|
* |
223
|
|
|
* @return Matchday |
224
|
|
|
*/ |
225
|
1 |
|
public function setRound(\Torakel\DatabaseBundle\Entity\Round $round = null) |
226
|
|
|
{ |
227
|
1 |
|
$this->round = $round; |
228
|
|
|
|
229
|
1 |
|
return $this; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* Get round |
234
|
|
|
* |
235
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Round |
236
|
|
|
*/ |
237
|
1 |
|
public function getRound() |
238
|
|
|
{ |
239
|
1 |
|
return $this->round; |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* Set group |
244
|
|
|
* |
245
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Group $group |
246
|
|
|
* |
247
|
|
|
* @return Matchday |
248
|
|
|
*/ |
249
|
1 |
|
public function setGroup(\Torakel\DatabaseBundle\Entity\Group $group = null) |
250
|
|
|
{ |
251
|
1 |
|
$this->group = $group; |
|
|
|
|
252
|
|
|
|
253
|
1 |
|
return $this; |
254
|
|
|
} |
255
|
|
|
|
256
|
|
|
/** |
257
|
|
|
* Get group |
258
|
|
|
* |
259
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Group |
260
|
|
|
*/ |
261
|
1 |
|
public function getGroup() |
262
|
|
|
{ |
263
|
1 |
|
return $this->group; |
|
|
|
|
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* Add game |
268
|
|
|
* |
269
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $game |
270
|
|
|
* |
271
|
|
|
* @return Matchday |
272
|
|
|
*/ |
273
|
1 |
|
public function addGame(\Torakel\DatabaseBundle\Entity\Game $game) |
274
|
|
|
{ |
275
|
1 |
|
$this->games[] = $game; |
276
|
|
|
|
277
|
1 |
|
return $this; |
278
|
|
|
} |
279
|
|
|
|
280
|
|
|
/** |
281
|
|
|
* Remove game |
282
|
|
|
* |
283
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $game |
284
|
|
|
*/ |
285
|
1 |
|
public function removeGame(\Torakel\DatabaseBundle\Entity\Game $game) |
286
|
|
|
{ |
287
|
1 |
|
$this->games->removeElement($game); |
288
|
1 |
|
} |
289
|
|
|
|
290
|
|
|
/** |
291
|
|
|
* Get games |
292
|
|
|
* |
293
|
|
|
* @return \Doctrine\Common\Collections\Collection |
294
|
|
|
*/ |
295
|
1 |
|
public function getGames() |
296
|
|
|
{ |
297
|
1 |
|
return $this->games; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* @ORM\PrePersist |
302
|
|
|
*/ |
303
|
1 |
|
public function prePersist() |
304
|
|
|
{ |
305
|
1 |
|
$this->createdAt = new \DateTime(); |
306
|
1 |
|
} |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* @ORM\PreUpdate |
310
|
|
|
*/ |
311
|
1 |
|
public function preUpdate() |
312
|
|
|
{ |
313
|
1 |
|
$this->updatedAt = new \DateTime(); |
314
|
1 |
|
} |
315
|
|
|
|
316
|
|
|
/** |
317
|
|
|
* Set matchdayTable |
318
|
|
|
* |
319
|
|
|
* @param \Torakel\DatabaseBundle\Entity\MatchdayTable $matchdayTable |
320
|
|
|
* |
321
|
|
|
* @return Matchday |
322
|
|
|
*/ |
323
|
1 |
|
public function setMatchdayTable(\Torakel\DatabaseBundle\Entity\MatchdayTable $matchdayTable = null) |
324
|
|
|
{ |
325
|
1 |
|
$this->matchdayTable = $matchdayTable; |
326
|
|
|
|
327
|
1 |
|
return $this; |
328
|
|
|
} |
329
|
|
|
|
330
|
|
|
/** |
331
|
|
|
* Get matchdayTable |
332
|
|
|
* |
333
|
|
|
* @return \Torakel\DatabaseBundle\Entity\MatchdayTable |
334
|
|
|
*/ |
335
|
1 |
|
public function getMatchdayTable() |
336
|
|
|
{ |
337
|
1 |
|
return $this->matchdayTable; |
338
|
|
|
} |
339
|
|
|
} |
340
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths