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