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\SubstitutionRepository") |
11
|
|
|
* @ORM\Table(name="substitution") |
12
|
|
|
*/ |
13
|
|
|
class Substitution |
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="integer", nullable=true) |
26
|
|
|
*/ |
27
|
|
|
protected $number; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var string |
31
|
|
|
* @ORM\Column(type="integer") |
32
|
|
|
*/ |
33
|
|
|
protected $minute; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var integer |
37
|
|
|
* @ORM\Column(type="integer") |
38
|
|
|
*/ |
39
|
|
|
protected $period; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var string |
43
|
|
|
* @ORM\Column(type="string", nullable=true) |
44
|
|
|
*/ |
45
|
|
|
protected $notice; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string |
49
|
|
|
* @ORM\Column(type="string", nullable=true) |
50
|
|
|
*/ |
51
|
|
|
protected $position; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Game |
55
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Game", inversedBy="substitutions") |
56
|
|
|
* @ORM\JoinColumn(name="game_id", referencedColumnName="id") |
57
|
|
|
*/ |
58
|
|
|
protected $game; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Team |
62
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Team", inversedBy="substitutions") |
63
|
|
|
* @ORM\JoinColumn(name="team_id", referencedColumnName="id") |
64
|
|
|
*/ |
65
|
|
|
protected $team; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Player |
69
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Player", inversedBy="intoSubstitutions") |
70
|
|
|
* @ORM\JoinColumn(name="into_player_id", referencedColumnName="id") |
71
|
|
|
*/ |
72
|
|
|
protected $intoPlayer; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Player |
76
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Player", inversedBy="outSubstitutions") |
77
|
|
|
* @ORM\JoinColumn(name="out_player_id", referencedColumnName="id") |
78
|
|
|
*/ |
79
|
|
|
protected $outPlayer; |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @var \DateTime |
83
|
|
|
* @ORM\Column(type="datetime", name="created_at") |
84
|
|
|
*/ |
85
|
|
|
protected $createdAt; |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @var \DateTime |
89
|
|
|
* @ORM\Column(type="datetime", name="updated_at", nullable=true) |
90
|
|
|
*/ |
91
|
|
|
protected $updatedAt; |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* Get id |
95
|
|
|
* |
96
|
|
|
* @return integer |
97
|
|
|
*/ |
98
|
1 |
|
public function getId() |
99
|
|
|
{ |
100
|
1 |
|
return $this->id; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* Set number |
105
|
|
|
* |
106
|
|
|
* @param integer $number |
107
|
|
|
* |
108
|
|
|
* @return Substitution |
109
|
|
|
*/ |
110
|
1 |
|
public function setNumber($number) |
111
|
|
|
{ |
112
|
1 |
|
$this->number = $number; |
113
|
|
|
|
114
|
1 |
|
return $this; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Get number |
119
|
|
|
* |
120
|
|
|
* @return integer |
121
|
|
|
*/ |
122
|
1 |
|
public function getNumber() |
123
|
|
|
{ |
124
|
1 |
|
return $this->number; |
|
|
|
|
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* Set minute |
129
|
|
|
* |
130
|
|
|
* @param integer $minute |
131
|
|
|
* |
132
|
|
|
* @return Substitution |
133
|
|
|
*/ |
134
|
1 |
|
public function setMinute($minute) |
135
|
|
|
{ |
136
|
1 |
|
$this->minute = $minute; |
137
|
|
|
|
138
|
1 |
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* Get minute |
143
|
|
|
* |
144
|
|
|
* @return integer |
145
|
|
|
*/ |
146
|
1 |
|
public function getMinute() |
147
|
|
|
{ |
148
|
1 |
|
return $this->minute; |
|
|
|
|
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* Set position |
153
|
|
|
* |
154
|
|
|
* @param string $position |
155
|
|
|
* |
156
|
|
|
* @return Substitution |
157
|
|
|
*/ |
158
|
1 |
|
public function setPosition($position) |
159
|
|
|
{ |
160
|
1 |
|
$this->position = $position; |
161
|
|
|
|
162
|
1 |
|
return $this; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* Get position |
167
|
|
|
* |
168
|
|
|
* @return string |
169
|
|
|
*/ |
170
|
1 |
|
public function getPosition() |
171
|
|
|
{ |
172
|
1 |
|
return $this->position; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* Set game |
177
|
|
|
* |
178
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $game |
179
|
|
|
* |
180
|
|
|
* @return Substitution |
181
|
|
|
*/ |
182
|
1 |
|
public function setGame(\Torakel\DatabaseBundle\Entity\Game $game = null) |
183
|
|
|
{ |
184
|
1 |
|
$this->game = $game; |
185
|
|
|
|
186
|
1 |
|
return $this; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* Get game |
191
|
|
|
* |
192
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Game |
193
|
|
|
*/ |
194
|
1 |
|
public function getGame() |
195
|
|
|
{ |
196
|
1 |
|
return $this->game; |
197
|
|
|
} |
198
|
|
|
|
199
|
|
|
/** |
200
|
|
|
* Set team |
201
|
|
|
* |
202
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Team $team |
203
|
|
|
* |
204
|
|
|
* @return Substitution |
205
|
|
|
*/ |
206
|
1 |
|
public function setTeam(\Torakel\DatabaseBundle\Entity\Team $team = null) |
207
|
|
|
{ |
208
|
1 |
|
$this->team = $team; |
209
|
|
|
|
210
|
1 |
|
return $this; |
211
|
|
|
} |
212
|
|
|
|
213
|
|
|
/** |
214
|
|
|
* Get team |
215
|
|
|
* |
216
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Team |
217
|
|
|
*/ |
218
|
1 |
|
public function getTeam() |
219
|
|
|
{ |
220
|
1 |
|
return $this->team; |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
/** |
224
|
|
|
* Set intoPlayer |
225
|
|
|
* |
226
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Player $intoPlayer |
227
|
|
|
* |
228
|
|
|
* @return Substitution |
229
|
|
|
*/ |
230
|
1 |
|
public function setIntoPlayer(\Torakel\DatabaseBundle\Entity\Player $intoPlayer = null) |
231
|
|
|
{ |
232
|
1 |
|
$this->intoPlayer = $intoPlayer; |
233
|
|
|
|
234
|
1 |
|
return $this; |
235
|
|
|
} |
236
|
|
|
|
237
|
|
|
/** |
238
|
|
|
* Get intoPlayer |
239
|
|
|
* |
240
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Player |
241
|
|
|
*/ |
242
|
1 |
|
public function getIntoPlayer() |
243
|
|
|
{ |
244
|
1 |
|
return $this->intoPlayer; |
245
|
|
|
} |
246
|
|
|
|
247
|
|
|
/** |
248
|
|
|
* Set outPlayer |
249
|
|
|
* |
250
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Player $outPlayer |
251
|
|
|
* |
252
|
|
|
* @return Substitution |
253
|
|
|
*/ |
254
|
1 |
|
public function setOutPlayer(\Torakel\DatabaseBundle\Entity\Player $outPlayer = null) |
255
|
|
|
{ |
256
|
1 |
|
$this->outPlayer = $outPlayer; |
257
|
|
|
|
258
|
1 |
|
return $this; |
259
|
|
|
} |
260
|
|
|
|
261
|
|
|
/** |
262
|
|
|
* Get outPlayer |
263
|
|
|
* |
264
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Player |
265
|
|
|
*/ |
266
|
1 |
|
public function getOutPlayer() |
267
|
|
|
{ |
268
|
1 |
|
return $this->outPlayer; |
269
|
|
|
} |
270
|
|
|
|
271
|
|
|
/** |
272
|
|
|
* Set createdAt |
273
|
|
|
* |
274
|
|
|
* @param \DateTime $createdAt |
275
|
|
|
* |
276
|
|
|
* @return Substitution |
277
|
|
|
*/ |
278
|
1 |
|
public function setCreatedAt($createdAt) |
279
|
|
|
{ |
280
|
1 |
|
$this->createdAt = $createdAt; |
281
|
|
|
|
282
|
1 |
|
return $this; |
283
|
|
|
} |
284
|
|
|
|
285
|
|
|
/** |
286
|
|
|
* Get createdAt |
287
|
|
|
* |
288
|
|
|
* @return \DateTime |
289
|
|
|
*/ |
290
|
1 |
|
public function getCreatedAt() |
291
|
|
|
{ |
292
|
1 |
|
return $this->createdAt; |
293
|
|
|
} |
294
|
|
|
|
295
|
|
|
/** |
296
|
|
|
* Set updatedAt |
297
|
|
|
* |
298
|
|
|
* @param \DateTime $updatedAt |
299
|
|
|
* |
300
|
|
|
* @return Substitution |
301
|
|
|
*/ |
302
|
1 |
|
public function setUpdatedAt($updatedAt) |
303
|
|
|
{ |
304
|
1 |
|
$this->updatedAt = $updatedAt; |
305
|
|
|
|
306
|
1 |
|
return $this; |
307
|
|
|
} |
308
|
|
|
|
309
|
|
|
/** |
310
|
|
|
* Get updatedAt |
311
|
|
|
* |
312
|
|
|
* @return \DateTime |
313
|
|
|
*/ |
314
|
1 |
|
public function getUpdatedAt() |
315
|
|
|
{ |
316
|
1 |
|
return $this->updatedAt; |
317
|
|
|
} |
318
|
|
|
|
319
|
|
|
/** |
320
|
|
|
* @ORM\PrePersist |
321
|
|
|
*/ |
322
|
1 |
|
public function prePersist() |
323
|
|
|
{ |
324
|
1 |
|
$this->createdAt = new \DateTime(); |
325
|
1 |
|
} |
326
|
|
|
|
327
|
|
|
/** |
328
|
|
|
* @ORM\PreUpdate |
329
|
|
|
*/ |
330
|
1 |
|
public function preUpdate() |
331
|
|
|
{ |
332
|
1 |
|
$this->updatedAt = new \DateTime(); |
333
|
1 |
|
} |
334
|
|
|
|
335
|
|
|
/** |
336
|
|
|
* Set period |
337
|
|
|
* |
338
|
|
|
* @param integer $period |
339
|
|
|
* |
340
|
|
|
* @return Substitution |
341
|
|
|
*/ |
342
|
1 |
|
public function setPeriod($period) |
343
|
|
|
{ |
344
|
1 |
|
$this->period = $period; |
345
|
|
|
|
346
|
1 |
|
return $this; |
347
|
|
|
} |
348
|
|
|
|
349
|
|
|
/** |
350
|
|
|
* Get period |
351
|
|
|
* |
352
|
|
|
* @return integer |
353
|
|
|
*/ |
354
|
1 |
|
public function getPeriod() |
355
|
|
|
{ |
356
|
1 |
|
return $this->period; |
357
|
|
|
} |
358
|
|
|
|
359
|
|
|
/** |
360
|
|
|
* Set notice |
361
|
|
|
* |
362
|
|
|
* @param string $notice |
363
|
|
|
* |
364
|
|
|
* @return Substitution |
365
|
|
|
*/ |
366
|
1 |
|
public function setNotice($notice) |
367
|
|
|
{ |
368
|
1 |
|
$this->notice = $notice; |
369
|
|
|
|
370
|
1 |
|
return $this; |
371
|
|
|
} |
372
|
|
|
|
373
|
|
|
/** |
374
|
|
|
* Get notice |
375
|
|
|
* |
376
|
|
|
* @return string |
377
|
|
|
*/ |
378
|
1 |
|
public function getNotice() |
379
|
|
|
{ |
380
|
1 |
|
return $this->notice; |
381
|
|
|
} |
382
|
|
|
} |
383
|
|
|
|
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