|
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\Table(name="team") |
|
11
|
|
|
*/ |
|
12
|
|
|
class Team |
|
13
|
|
|
{ |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* @var integer |
|
17
|
|
|
* @ORM\Column(type="integer") |
|
18
|
|
|
* @ORM\Id |
|
19
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
|
20
|
|
|
*/ |
|
21
|
|
|
private $id; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* @var string |
|
25
|
|
|
* @ORM\Column(type="string") |
|
26
|
|
|
*/ |
|
27
|
|
|
protected $slug; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @var string |
|
31
|
|
|
* @ORM\Column(type="string") |
|
32
|
|
|
*/ |
|
33
|
|
|
protected $name; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @var string |
|
37
|
|
|
* @ORM\Column(type="text", nullable=true) |
|
38
|
|
|
*/ |
|
39
|
|
|
protected $altNames; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var string |
|
43
|
|
|
* @ORM\Column(type="text") |
|
44
|
|
|
*/ |
|
45
|
|
|
protected $type; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Club |
|
49
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Club", inversedBy="teams") |
|
50
|
|
|
* @ORM\JoinColumn(name="club_id", referencedColumnName="id") |
|
51
|
|
|
*/ |
|
52
|
|
|
protected $club; |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
56
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\Game", mappedBy="teamHome") |
|
57
|
|
|
*/ |
|
58
|
|
|
protected $homeGames; |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
62
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\Game", mappedBy="teamAway") |
|
63
|
|
|
*/ |
|
64
|
|
|
protected $awayGames; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
68
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\Goal", mappedBy="team") |
|
69
|
|
|
*/ |
|
70
|
|
|
protected $goals; |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
74
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\GamePlayer", mappedBy="team") |
|
75
|
|
|
*/ |
|
76
|
|
|
protected $gamePlayers; |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
80
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\GamePlayerStatistic", mappedBy="team") |
|
81
|
|
|
*/ |
|
82
|
|
|
protected $gamePlayerStatistics; |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
86
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\GameTeamStatistic", mappedBy="team") |
|
87
|
|
|
*/ |
|
88
|
|
|
protected $gameTeamStatistics; |
|
89
|
|
|
|
|
90
|
|
|
/** |
|
91
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
92
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\Substitution", mappedBy="team") |
|
93
|
|
|
*/ |
|
94
|
|
|
protected $substitutions; |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
98
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\Card", mappedBy="team") |
|
99
|
|
|
*/ |
|
100
|
|
|
protected $cards; |
|
101
|
|
|
|
|
102
|
|
|
/** |
|
103
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection; |
|
104
|
|
|
* @ORM\OneToMany(targetEntity="\Torakel\DatabaseBundle\Entity\TablePosition", mappedBy="team") |
|
105
|
|
|
*/ |
|
106
|
|
|
protected $tablePositions; |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* @var integer |
|
110
|
|
|
* @ORM\Column(type="integer") |
|
111
|
|
|
*/ |
|
112
|
|
|
protected $position; |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* @var \DateTime |
|
116
|
|
|
* @ORM\Column(type="datetime", name="created_at") |
|
117
|
|
|
*/ |
|
118
|
|
|
protected $createdAt; |
|
119
|
|
|
|
|
120
|
|
|
/** |
|
121
|
|
|
* @var \DateTime |
|
122
|
|
|
* @ORM\Column(type="datetime", name="updated_at", nullable=true) |
|
123
|
|
|
*/ |
|
124
|
|
|
protected $updatedAt; |
|
125
|
|
|
|
|
126
|
|
|
/** |
|
127
|
|
|
* Constructor |
|
128
|
|
|
*/ |
|
129
|
10 |
|
public function __construct() |
|
130
|
|
|
{ |
|
131
|
10 |
|
$this->homeGames = new \Doctrine\Common\Collections\ArrayCollection(); |
|
132
|
10 |
|
$this->awayGames = new \Doctrine\Common\Collections\ArrayCollection(); |
|
133
|
10 |
|
$this->goals = new \Doctrine\Common\Collections\ArrayCollection(); |
|
134
|
10 |
|
$this->gamePlayers = new \Doctrine\Common\Collections\ArrayCollection(); |
|
135
|
10 |
|
$this->gamePlayerStatistics = new \Doctrine\Common\Collections\ArrayCollection(); |
|
136
|
10 |
|
$this->gameTeamStatistics = new \Doctrine\Common\Collections\ArrayCollection(); |
|
137
|
10 |
|
$this->substitutions = new \Doctrine\Common\Collections\ArrayCollection(); |
|
138
|
10 |
|
$this->cards = new \Doctrine\Common\Collections\ArrayCollection(); |
|
139
|
10 |
|
$this->tablePositions = new \Doctrine\Common\Collections\ArrayCollection(); |
|
140
|
10 |
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* Get id |
|
144
|
|
|
* |
|
145
|
|
|
* @return integer |
|
146
|
|
|
*/ |
|
147
|
1 |
|
public function getId() |
|
148
|
|
|
{ |
|
149
|
1 |
|
return $this->id; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* Set slug |
|
154
|
|
|
* |
|
155
|
|
|
* @param string $slug |
|
156
|
|
|
* |
|
157
|
|
|
* @return Team |
|
158
|
|
|
*/ |
|
159
|
1 |
|
public function setSlug($slug) |
|
160
|
|
|
{ |
|
161
|
1 |
|
$this->slug = $slug; |
|
162
|
|
|
|
|
163
|
1 |
|
return $this; |
|
164
|
|
|
} |
|
165
|
|
|
|
|
166
|
|
|
/** |
|
167
|
|
|
* Get slug |
|
168
|
|
|
* |
|
169
|
|
|
* @return string |
|
170
|
|
|
*/ |
|
171
|
1 |
|
public function getSlug() |
|
172
|
|
|
{ |
|
173
|
1 |
|
return $this->slug; |
|
174
|
|
|
} |
|
175
|
|
|
|
|
176
|
|
|
/** |
|
177
|
|
|
* Set name |
|
178
|
|
|
* |
|
179
|
|
|
* @param string $name |
|
180
|
|
|
* |
|
181
|
|
|
* @return Team |
|
182
|
|
|
*/ |
|
183
|
1 |
|
public function setName($name) |
|
184
|
|
|
{ |
|
185
|
1 |
|
$this->name = $name; |
|
186
|
|
|
|
|
187
|
1 |
|
return $this; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
/** |
|
191
|
|
|
* Get name |
|
192
|
|
|
* |
|
193
|
|
|
* @return string |
|
194
|
|
|
*/ |
|
195
|
1 |
|
public function getName() |
|
196
|
|
|
{ |
|
197
|
1 |
|
return $this->name; |
|
198
|
|
|
} |
|
199
|
|
|
|
|
200
|
|
|
/** |
|
201
|
|
|
* Add alt(ernative) name |
|
202
|
|
|
* |
|
203
|
|
|
* Adds an alternative name to the entity. For example external IDs. |
|
204
|
|
|
* |
|
205
|
|
|
* @param $name |
|
206
|
|
|
*/ |
|
207
|
1 |
|
public function addAltName($name) |
|
208
|
|
|
{ |
|
209
|
1 |
|
$names = $this->getAltNames(); |
|
210
|
1 |
|
if (in_array($name, $names) === false) { |
|
211
|
1 |
|
$names[] = $name; |
|
212
|
1 |
|
$this->setAltNames($names); |
|
213
|
|
|
} |
|
214
|
1 |
|
} |
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* Set altNames |
|
218
|
|
|
* |
|
219
|
|
|
* @param array $altNames |
|
220
|
|
|
* |
|
221
|
|
|
* @return Player |
|
222
|
|
|
*/ |
|
223
|
1 |
|
public function setAltNames($altNames) |
|
224
|
|
|
{ |
|
225
|
1 |
|
$this->altNames = implode('|', $altNames); |
|
226
|
|
|
|
|
227
|
1 |
|
return $this; |
|
|
|
|
|
|
228
|
|
|
} |
|
229
|
|
|
|
|
230
|
|
|
/** |
|
231
|
|
|
* Get altNames |
|
232
|
|
|
* |
|
233
|
|
|
* @return array |
|
234
|
|
|
*/ |
|
235
|
1 |
|
public function getAltNames() |
|
236
|
|
|
{ |
|
237
|
1 |
|
return explode('|', $this->altNames); |
|
238
|
|
|
} |
|
239
|
|
|
|
|
240
|
|
|
/** |
|
241
|
|
|
* Set position |
|
242
|
|
|
* |
|
243
|
|
|
* @param integer $position |
|
244
|
|
|
* |
|
245
|
|
|
* @return Team |
|
246
|
|
|
*/ |
|
247
|
1 |
|
public function setPosition($position) |
|
248
|
|
|
{ |
|
249
|
1 |
|
$this->position = $position; |
|
250
|
|
|
|
|
251
|
1 |
|
return $this; |
|
252
|
|
|
} |
|
253
|
|
|
|
|
254
|
|
|
/** |
|
255
|
|
|
* Get position |
|
256
|
|
|
* |
|
257
|
|
|
* @return integer |
|
258
|
|
|
*/ |
|
259
|
1 |
|
public function getPosition() |
|
260
|
|
|
{ |
|
261
|
1 |
|
return $this->position; |
|
262
|
|
|
} |
|
263
|
|
|
|
|
264
|
|
|
/** |
|
265
|
|
|
* Set createdAt |
|
266
|
|
|
* |
|
267
|
|
|
* @param \DateTime $createdAt |
|
268
|
|
|
* |
|
269
|
|
|
* @return Team |
|
270
|
|
|
*/ |
|
271
|
1 |
|
public function setCreatedAt($createdAt) |
|
272
|
|
|
{ |
|
273
|
1 |
|
$this->createdAt = $createdAt; |
|
274
|
|
|
|
|
275
|
1 |
|
return $this; |
|
276
|
|
|
} |
|
277
|
|
|
|
|
278
|
|
|
/** |
|
279
|
|
|
* Get createdAt |
|
280
|
|
|
* |
|
281
|
|
|
* @return \DateTime |
|
282
|
|
|
*/ |
|
283
|
1 |
|
public function getCreatedAt() |
|
284
|
|
|
{ |
|
285
|
1 |
|
return $this->createdAt; |
|
286
|
|
|
} |
|
287
|
|
|
|
|
288
|
|
|
/** |
|
289
|
|
|
* Set updatedAt |
|
290
|
|
|
* |
|
291
|
|
|
* @param \DateTime $updatedAt |
|
292
|
|
|
* |
|
293
|
|
|
* @return Team |
|
294
|
|
|
*/ |
|
295
|
1 |
|
public function setUpdatedAt($updatedAt) |
|
296
|
|
|
{ |
|
297
|
1 |
|
$this->updatedAt = $updatedAt; |
|
298
|
|
|
|
|
299
|
1 |
|
return $this; |
|
300
|
|
|
} |
|
301
|
|
|
|
|
302
|
|
|
/** |
|
303
|
|
|
* Get updatedAt |
|
304
|
|
|
* |
|
305
|
|
|
* @return \DateTime |
|
306
|
|
|
*/ |
|
307
|
1 |
|
public function getUpdatedAt() |
|
308
|
|
|
{ |
|
309
|
1 |
|
return $this->updatedAt; |
|
310
|
|
|
} |
|
311
|
|
|
|
|
312
|
|
|
/** |
|
313
|
|
|
* Set club |
|
314
|
|
|
* |
|
315
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Club $club |
|
316
|
|
|
* |
|
317
|
|
|
* @return Team |
|
318
|
|
|
*/ |
|
319
|
1 |
|
public function setClub(\Torakel\DatabaseBundle\Entity\Club $club = null) |
|
320
|
|
|
{ |
|
321
|
1 |
|
$this->club = $club; |
|
322
|
|
|
|
|
323
|
1 |
|
return $this; |
|
324
|
|
|
} |
|
325
|
|
|
|
|
326
|
|
|
/** |
|
327
|
|
|
* Get club |
|
328
|
|
|
* |
|
329
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Club |
|
330
|
|
|
*/ |
|
331
|
1 |
|
public function getClub() |
|
332
|
|
|
{ |
|
333
|
1 |
|
return $this->club; |
|
334
|
|
|
} |
|
335
|
|
|
|
|
336
|
|
|
/** |
|
337
|
|
|
* Add homeGame |
|
338
|
|
|
* |
|
339
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $homeGame |
|
340
|
|
|
* |
|
341
|
|
|
* @return Team |
|
342
|
|
|
*/ |
|
343
|
1 |
|
public function addHomeGame(\Torakel\DatabaseBundle\Entity\Game $homeGame) |
|
344
|
|
|
{ |
|
345
|
1 |
|
$this->homeGames[] = $homeGame; |
|
346
|
|
|
|
|
347
|
1 |
|
return $this; |
|
348
|
|
|
} |
|
349
|
|
|
|
|
350
|
|
|
/** |
|
351
|
|
|
* Remove homeGame |
|
352
|
|
|
* |
|
353
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $homeGame |
|
354
|
|
|
*/ |
|
355
|
1 |
|
public function removeHomeGame(\Torakel\DatabaseBundle\Entity\Game $homeGame) |
|
356
|
|
|
{ |
|
357
|
1 |
|
$this->homeGames->removeElement($homeGame); |
|
358
|
1 |
|
} |
|
359
|
|
|
|
|
360
|
|
|
/** |
|
361
|
|
|
* Get homeGames |
|
362
|
|
|
* |
|
363
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
364
|
|
|
*/ |
|
365
|
1 |
|
public function getHomeGames() |
|
366
|
|
|
{ |
|
367
|
1 |
|
return $this->homeGames; |
|
368
|
|
|
} |
|
369
|
|
|
|
|
370
|
|
|
/** |
|
371
|
|
|
* Add awayGame |
|
372
|
|
|
* |
|
373
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $awayGame |
|
374
|
|
|
* |
|
375
|
|
|
* @return Team |
|
376
|
|
|
*/ |
|
377
|
1 |
|
public function addAwayGame(\Torakel\DatabaseBundle\Entity\Game $awayGame) |
|
378
|
|
|
{ |
|
379
|
1 |
|
$this->awayGames[] = $awayGame; |
|
380
|
|
|
|
|
381
|
1 |
|
return $this; |
|
382
|
|
|
} |
|
383
|
|
|
|
|
384
|
|
|
/** |
|
385
|
|
|
* Remove awayGame |
|
386
|
|
|
* |
|
387
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $awayGame |
|
388
|
|
|
*/ |
|
389
|
1 |
|
public function removeAwayGame(\Torakel\DatabaseBundle\Entity\Game $awayGame) |
|
390
|
|
|
{ |
|
391
|
1 |
|
$this->awayGames->removeElement($awayGame); |
|
392
|
1 |
|
} |
|
393
|
|
|
|
|
394
|
|
|
/** |
|
395
|
|
|
* Get awayGames |
|
396
|
|
|
* |
|
397
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
398
|
|
|
*/ |
|
399
|
1 |
|
public function getAwayGames() |
|
400
|
|
|
{ |
|
401
|
1 |
|
return $this->awayGames; |
|
402
|
|
|
} |
|
403
|
|
|
|
|
404
|
|
|
/** |
|
405
|
|
|
* Add goal |
|
406
|
|
|
* |
|
407
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Goal $goal |
|
408
|
|
|
* |
|
409
|
|
|
* @return Team |
|
410
|
|
|
*/ |
|
411
|
1 |
|
public function addGoal(\Torakel\DatabaseBundle\Entity\Goal $goal) |
|
412
|
|
|
{ |
|
413
|
1 |
|
$this->goals[] = $goal; |
|
414
|
|
|
|
|
415
|
1 |
|
return $this; |
|
416
|
|
|
} |
|
417
|
|
|
|
|
418
|
|
|
/** |
|
419
|
|
|
* Remove goal |
|
420
|
|
|
* |
|
421
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Goal $goal |
|
422
|
|
|
*/ |
|
423
|
1 |
|
public function removeGoal(\Torakel\DatabaseBundle\Entity\Goal $goal) |
|
424
|
|
|
{ |
|
425
|
1 |
|
$this->goals->removeElement($goal); |
|
426
|
1 |
|
} |
|
427
|
|
|
|
|
428
|
|
|
/** |
|
429
|
|
|
* Get goals |
|
430
|
|
|
* |
|
431
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
432
|
|
|
*/ |
|
433
|
1 |
|
public function getGoals() |
|
434
|
|
|
{ |
|
435
|
1 |
|
return $this->goals; |
|
436
|
|
|
} |
|
437
|
|
|
|
|
438
|
|
|
/** |
|
439
|
|
|
* Add card |
|
440
|
|
|
* |
|
441
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Card $card |
|
442
|
|
|
* |
|
443
|
|
|
* @return Team |
|
444
|
|
|
*/ |
|
445
|
1 |
|
public function addCard(\Torakel\DatabaseBundle\Entity\Card $card) |
|
446
|
|
|
{ |
|
447
|
1 |
|
$this->cards[] = $card; |
|
448
|
|
|
|
|
449
|
1 |
|
return $this; |
|
450
|
|
|
} |
|
451
|
|
|
|
|
452
|
|
|
/** |
|
453
|
|
|
* Remove card |
|
454
|
|
|
* |
|
455
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Card $card |
|
456
|
|
|
*/ |
|
457
|
1 |
|
public function removeCard(\Torakel\DatabaseBundle\Entity\Card $card) |
|
458
|
|
|
{ |
|
459
|
1 |
|
$this->cards->removeElement($card); |
|
460
|
1 |
|
} |
|
461
|
|
|
|
|
462
|
|
|
/** |
|
463
|
|
|
* Get cards |
|
464
|
|
|
* |
|
465
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
466
|
|
|
*/ |
|
467
|
1 |
|
public function getCards() |
|
468
|
|
|
{ |
|
469
|
1 |
|
return $this->cards; |
|
470
|
|
|
} |
|
471
|
|
|
|
|
472
|
|
|
/** |
|
473
|
|
|
* Add gamePlayer |
|
474
|
|
|
* |
|
475
|
|
|
* @param \Torakel\DatabaseBundle\Entity\GamePlayer $gamePlayer |
|
476
|
|
|
* |
|
477
|
|
|
* @return Team |
|
478
|
|
|
*/ |
|
479
|
1 |
|
public function addGamePlayer(\Torakel\DatabaseBundle\Entity\GamePlayer $gamePlayer) |
|
480
|
|
|
{ |
|
481
|
1 |
|
$this->gamePlayers[] = $gamePlayer; |
|
482
|
|
|
|
|
483
|
1 |
|
return $this; |
|
484
|
|
|
} |
|
485
|
|
|
|
|
486
|
|
|
/** |
|
487
|
|
|
* Remove gamePlayer |
|
488
|
|
|
* |
|
489
|
|
|
* @param \Torakel\DatabaseBundle\Entity\GamePlayer $gamePlayer |
|
490
|
|
|
*/ |
|
491
|
1 |
|
public function removeGamePlayer(\Torakel\DatabaseBundle\Entity\GamePlayer $gamePlayer) |
|
492
|
|
|
{ |
|
493
|
1 |
|
$this->gamePlayers->removeElement($gamePlayer); |
|
494
|
1 |
|
} |
|
495
|
|
|
|
|
496
|
|
|
/** |
|
497
|
|
|
* Get gamePlayers |
|
498
|
|
|
* |
|
499
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
500
|
|
|
*/ |
|
501
|
1 |
|
public function getGamePlayers() |
|
502
|
|
|
{ |
|
503
|
1 |
|
return $this->gamePlayers; |
|
504
|
|
|
} |
|
505
|
|
|
|
|
506
|
|
|
/** |
|
507
|
|
|
* Add substitution |
|
508
|
|
|
* |
|
509
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Substitution $substitution |
|
510
|
|
|
* |
|
511
|
|
|
* @return Team |
|
512
|
|
|
*/ |
|
513
|
1 |
|
public function addSubstitution(\Torakel\DatabaseBundle\Entity\Substitution $substitution) |
|
514
|
|
|
{ |
|
515
|
1 |
|
$this->substitutions[] = $substitution; |
|
516
|
|
|
|
|
517
|
1 |
|
return $this; |
|
518
|
|
|
} |
|
519
|
|
|
|
|
520
|
|
|
/** |
|
521
|
|
|
* Remove substitution |
|
522
|
|
|
* |
|
523
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Substitution $substitution |
|
524
|
|
|
*/ |
|
525
|
1 |
|
public function removeSubstitution(\Torakel\DatabaseBundle\Entity\Substitution $substitution) |
|
526
|
|
|
{ |
|
527
|
1 |
|
$this->substitutions->removeElement($substitution); |
|
528
|
1 |
|
} |
|
529
|
|
|
|
|
530
|
|
|
/** |
|
531
|
|
|
* Get substitutions |
|
532
|
|
|
* |
|
533
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
534
|
|
|
*/ |
|
535
|
1 |
|
public function getSubstitutions() |
|
536
|
|
|
{ |
|
537
|
1 |
|
return $this->substitutions; |
|
538
|
|
|
} |
|
539
|
|
|
|
|
540
|
|
|
|
|
541
|
|
|
/** |
|
542
|
|
|
* @ORM\PrePersist |
|
543
|
|
|
*/ |
|
544
|
1 |
|
public function prePersist() |
|
545
|
|
|
{ |
|
546
|
1 |
|
$this->createdAt = new \DateTime(); |
|
547
|
1 |
|
$altNames = $this->getAltNames(); |
|
548
|
1 |
|
$altNames[999999] = ''; |
|
549
|
1 |
|
$this->setAltNames($altNames); |
|
550
|
1 |
|
} |
|
551
|
|
|
|
|
552
|
|
|
/** |
|
553
|
|
|
* @ORM\PreUpdate |
|
554
|
|
|
*/ |
|
555
|
1 |
|
public function preUpdate() |
|
556
|
|
|
{ |
|
557
|
1 |
|
$this->updatedAt = new \DateTime(); |
|
558
|
1 |
|
} |
|
559
|
|
|
|
|
560
|
|
|
/** |
|
561
|
|
|
* Set type |
|
562
|
|
|
* |
|
563
|
|
|
* @param string $type |
|
564
|
|
|
* |
|
565
|
|
|
* @return Team |
|
566
|
|
|
*/ |
|
567
|
1 |
|
public function setType($type) |
|
568
|
|
|
{ |
|
569
|
1 |
|
$this->type = $type; |
|
570
|
|
|
|
|
571
|
1 |
|
return $this; |
|
572
|
|
|
} |
|
573
|
|
|
|
|
574
|
|
|
/** |
|
575
|
|
|
* Get type |
|
576
|
|
|
* |
|
577
|
|
|
* @return string |
|
578
|
|
|
*/ |
|
579
|
1 |
|
public function getType() |
|
580
|
|
|
{ |
|
581
|
1 |
|
return $this->type; |
|
582
|
|
|
} |
|
583
|
|
|
|
|
584
|
|
|
/** |
|
585
|
|
|
* Add tablePosition |
|
586
|
|
|
* |
|
587
|
|
|
* @param \Torakel\DatabaseBundle\Entity\TablePosition $tablePosition |
|
588
|
|
|
* |
|
589
|
|
|
* @return Team |
|
590
|
|
|
*/ |
|
591
|
1 |
|
public function addTablePosition(\Torakel\DatabaseBundle\Entity\TablePosition $tablePosition) |
|
592
|
|
|
{ |
|
593
|
1 |
|
$this->tablePositions[] = $tablePosition; |
|
594
|
|
|
|
|
595
|
1 |
|
return $this; |
|
596
|
|
|
} |
|
597
|
|
|
|
|
598
|
|
|
/** |
|
599
|
|
|
* Remove tablePosition |
|
600
|
|
|
* |
|
601
|
|
|
* @param \Torakel\DatabaseBundle\Entity\TablePosition $tablePosition |
|
602
|
|
|
*/ |
|
603
|
1 |
|
public function removeTablePosition(\Torakel\DatabaseBundle\Entity\TablePosition $tablePosition) |
|
604
|
|
|
{ |
|
605
|
1 |
|
$this->tablePositions->removeElement($tablePosition); |
|
606
|
1 |
|
} |
|
607
|
|
|
|
|
608
|
|
|
/** |
|
609
|
|
|
* Get tablePositions |
|
610
|
|
|
* |
|
611
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
612
|
|
|
*/ |
|
613
|
1 |
|
public function getTablePositions() |
|
614
|
|
|
{ |
|
615
|
1 |
|
return $this->tablePositions; |
|
616
|
|
|
} |
|
617
|
|
|
|
|
618
|
|
|
/** |
|
619
|
|
|
* Add gamePlayerStatistic |
|
620
|
|
|
* |
|
621
|
|
|
* @param \Torakel\DatabaseBundle\Entity\GamePlayerStatistic $gamePlayerStatistic |
|
622
|
|
|
* |
|
623
|
|
|
* @return Team |
|
624
|
|
|
*/ |
|
625
|
1 |
|
public function addGamePlayerStatistic(\Torakel\DatabaseBundle\Entity\GamePlayerStatistic $gamePlayerStatistic) |
|
626
|
|
|
{ |
|
627
|
1 |
|
$this->gamePlayerStatistics[] = $gamePlayerStatistic; |
|
628
|
|
|
|
|
629
|
1 |
|
return $this; |
|
630
|
|
|
} |
|
631
|
|
|
|
|
632
|
|
|
/** |
|
633
|
|
|
* Remove gamePlayerStatistic |
|
634
|
|
|
* |
|
635
|
|
|
* @param \Torakel\DatabaseBundle\Entity\GamePlayerStatistic $gamePlayerStatistic |
|
636
|
|
|
*/ |
|
637
|
1 |
|
public function removeGamePlayerStatistic(\Torakel\DatabaseBundle\Entity\GamePlayerStatistic $gamePlayerStatistic) |
|
638
|
|
|
{ |
|
639
|
1 |
|
$this->gamePlayerStatistics->removeElement($gamePlayerStatistic); |
|
640
|
1 |
|
} |
|
641
|
|
|
|
|
642
|
|
|
/** |
|
643
|
|
|
* Get gamePlayerStatistics |
|
644
|
|
|
* |
|
645
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
646
|
|
|
*/ |
|
647
|
1 |
|
public function getGamePlayerStatistics() |
|
648
|
|
|
{ |
|
649
|
1 |
|
return $this->gamePlayerStatistics; |
|
650
|
|
|
} |
|
651
|
|
|
|
|
652
|
|
|
/** |
|
653
|
|
|
* Add gameTeamStatistic |
|
654
|
|
|
* |
|
655
|
|
|
* @param \Torakel\DatabaseBundle\Entity\GameTeamStatistic $gameTeamStatistic |
|
656
|
|
|
* |
|
657
|
|
|
* @return Team |
|
658
|
|
|
*/ |
|
659
|
1 |
|
public function addGameTeamStatistic(\Torakel\DatabaseBundle\Entity\GameTeamStatistic $gameTeamStatistic) |
|
660
|
|
|
{ |
|
661
|
1 |
|
$this->gameTeamStatistics[] = $gameTeamStatistic; |
|
662
|
|
|
|
|
663
|
1 |
|
return $this; |
|
664
|
|
|
} |
|
665
|
|
|
|
|
666
|
|
|
/** |
|
667
|
|
|
* Remove gameTeamStatistic |
|
668
|
|
|
* |
|
669
|
|
|
* @param \Torakel\DatabaseBundle\Entity\GameTeamStatistic $gameTeamStatistic |
|
670
|
|
|
*/ |
|
671
|
1 |
|
public function removeGameTeamStatistic(\Torakel\DatabaseBundle\Entity\GameTeamStatistic $gameTeamStatistic) |
|
672
|
|
|
{ |
|
673
|
1 |
|
$this->gameTeamStatistics->removeElement($gameTeamStatistic); |
|
674
|
1 |
|
} |
|
675
|
|
|
|
|
676
|
|
|
/** |
|
677
|
|
|
* Get gameTeamStatistics |
|
678
|
|
|
* |
|
679
|
|
|
* @return \Doctrine\Common\Collections\Collection |
|
680
|
|
|
*/ |
|
681
|
1 |
|
public function getGameTeamStatistics() |
|
682
|
|
|
{ |
|
683
|
1 |
|
return $this->gameTeamStatistics; |
|
684
|
|
|
} |
|
685
|
|
|
} |
|
686
|
|
|
|
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