|
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\GamePlayerRepository") |
|
11
|
|
|
* @ORM\Table(name="game_player") |
|
12
|
|
|
*/ |
|
13
|
|
|
class GamePlayer |
|
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") |
|
26
|
|
|
*/ |
|
27
|
|
|
protected $number; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @var string |
|
31
|
|
|
* @ORM\Column(type="string") |
|
32
|
|
|
*/ |
|
33
|
|
|
protected $position; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @var string |
|
37
|
|
|
* @ORM\Column(type="string") |
|
38
|
|
|
*/ |
|
39
|
|
|
protected $status; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Game |
|
43
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Game", inversedBy="gamePlayers") |
|
44
|
|
|
* @ORM\JoinColumn(name="game_id", referencedColumnName="id") |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $game; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Team |
|
50
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Team", inversedBy="gamePlayers") |
|
51
|
|
|
* @ORM\JoinColumn(name="team_id", referencedColumnName="id") |
|
52
|
|
|
*/ |
|
53
|
|
|
protected $team; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @var \Torakel\DatabaseBundle\Entity\Player |
|
57
|
|
|
* @ORM\ManyToOne(targetEntity="\Torakel\DatabaseBundle\Entity\Player", inversedBy="gamePlayers") |
|
58
|
|
|
* @ORM\JoinColumn(name="player_id", referencedColumnName="id") |
|
59
|
|
|
*/ |
|
60
|
|
|
protected $player; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @var \DateTime |
|
64
|
|
|
* @ORM\Column(type="datetime", name="created_at") |
|
65
|
|
|
*/ |
|
66
|
|
|
protected $createdAt; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @var \DateTime |
|
70
|
|
|
* @ORM\Column(type="datetime", name="updated_at", nullable=true) |
|
71
|
|
|
*/ |
|
72
|
|
|
protected $updatedAt; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* Get id |
|
76
|
|
|
* |
|
77
|
|
|
* @return integer |
|
78
|
|
|
*/ |
|
79
|
1 |
|
public function getId() |
|
80
|
|
|
{ |
|
81
|
1 |
|
return $this->id; |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* Set number |
|
86
|
|
|
* |
|
87
|
|
|
* @param integer $number |
|
88
|
|
|
* |
|
89
|
|
|
* @return GamePlayer |
|
90
|
|
|
*/ |
|
91
|
1 |
|
public function setNumber($number) |
|
92
|
|
|
{ |
|
93
|
1 |
|
$this->number = $number; |
|
94
|
|
|
|
|
95
|
1 |
|
return $this; |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
/** |
|
99
|
|
|
* Get number |
|
100
|
|
|
* |
|
101
|
|
|
* @return integer |
|
102
|
|
|
*/ |
|
103
|
1 |
|
public function getNumber() |
|
104
|
|
|
{ |
|
105
|
1 |
|
return $this->number; |
|
|
|
|
|
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* Set position |
|
110
|
|
|
* |
|
111
|
|
|
* @param string $position |
|
112
|
|
|
* |
|
113
|
|
|
* @return GamePlayer |
|
114
|
|
|
*/ |
|
115
|
1 |
|
public function setPosition($position) |
|
116
|
|
|
{ |
|
117
|
1 |
|
$this->position = $position; |
|
118
|
|
|
|
|
119
|
1 |
|
return $this; |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
/** |
|
123
|
|
|
* Get position |
|
124
|
|
|
* |
|
125
|
|
|
* @return string |
|
126
|
|
|
*/ |
|
127
|
1 |
|
public function getPosition() |
|
128
|
|
|
{ |
|
129
|
1 |
|
return $this->position; |
|
130
|
|
|
} |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* Set game |
|
134
|
|
|
* |
|
135
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Game $game |
|
136
|
|
|
* |
|
137
|
|
|
* @return GamePlayer |
|
138
|
|
|
*/ |
|
139
|
1 |
|
public function setGame(\Torakel\DatabaseBundle\Entity\Game $game = null) |
|
140
|
|
|
{ |
|
141
|
1 |
|
$this->game = $game; |
|
142
|
|
|
|
|
143
|
1 |
|
return $this; |
|
144
|
|
|
} |
|
145
|
|
|
|
|
146
|
|
|
/** |
|
147
|
|
|
* Get game |
|
148
|
|
|
* |
|
149
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Game |
|
150
|
|
|
*/ |
|
151
|
1 |
|
public function getGame() |
|
152
|
|
|
{ |
|
153
|
1 |
|
return $this->game; |
|
154
|
|
|
} |
|
155
|
|
|
|
|
156
|
|
|
/** |
|
157
|
|
|
* Set team |
|
158
|
|
|
* |
|
159
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Team $team |
|
160
|
|
|
* |
|
161
|
|
|
* @return GamePlayer |
|
162
|
|
|
*/ |
|
163
|
1 |
|
public function setTeam(\Torakel\DatabaseBundle\Entity\Team $team = null) |
|
164
|
|
|
{ |
|
165
|
1 |
|
$this->team = $team; |
|
166
|
|
|
|
|
167
|
1 |
|
return $this; |
|
168
|
|
|
} |
|
169
|
|
|
|
|
170
|
|
|
/** |
|
171
|
|
|
* Get team |
|
172
|
|
|
* |
|
173
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Team |
|
174
|
|
|
*/ |
|
175
|
1 |
|
public function getTeam() |
|
176
|
|
|
{ |
|
177
|
1 |
|
return $this->team; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
/** |
|
181
|
|
|
* Set player |
|
182
|
|
|
* |
|
183
|
|
|
* @param \Torakel\DatabaseBundle\Entity\Player $player |
|
184
|
|
|
* |
|
185
|
|
|
* @return GamePlayer |
|
186
|
|
|
*/ |
|
187
|
1 |
|
public function setPlayer(\Torakel\DatabaseBundle\Entity\Player $player = null) |
|
188
|
|
|
{ |
|
189
|
1 |
|
$this->player = $player; |
|
190
|
|
|
|
|
191
|
1 |
|
return $this; |
|
192
|
|
|
} |
|
193
|
|
|
|
|
194
|
|
|
/** |
|
195
|
|
|
* Get player |
|
196
|
|
|
* |
|
197
|
|
|
* @return \Torakel\DatabaseBundle\Entity\Player |
|
198
|
|
|
*/ |
|
199
|
1 |
|
public function getPlayer() |
|
200
|
|
|
{ |
|
201
|
1 |
|
return $this->player; |
|
202
|
|
|
} |
|
203
|
|
|
|
|
204
|
|
|
/** |
|
205
|
|
|
* Set createdAt |
|
206
|
|
|
* |
|
207
|
|
|
* @param \DateTime $createdAt |
|
208
|
|
|
* |
|
209
|
|
|
* @return GamePlayer |
|
210
|
|
|
*/ |
|
211
|
1 |
|
public function setCreatedAt($createdAt) |
|
212
|
|
|
{ |
|
213
|
1 |
|
$this->createdAt = $createdAt; |
|
214
|
|
|
|
|
215
|
1 |
|
return $this; |
|
216
|
|
|
} |
|
217
|
|
|
|
|
218
|
|
|
/** |
|
219
|
|
|
* Get createdAt |
|
220
|
|
|
* |
|
221
|
|
|
* @return \DateTime |
|
222
|
|
|
*/ |
|
223
|
1 |
|
public function getCreatedAt() |
|
224
|
|
|
{ |
|
225
|
1 |
|
return $this->createdAt; |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
/** |
|
229
|
|
|
* Set updatedAt |
|
230
|
|
|
* |
|
231
|
|
|
* @param \DateTime $updatedAt |
|
232
|
|
|
* |
|
233
|
|
|
* @return GamePlayer |
|
234
|
|
|
*/ |
|
235
|
1 |
|
public function setUpdatedAt($updatedAt) |
|
236
|
|
|
{ |
|
237
|
1 |
|
$this->updatedAt = $updatedAt; |
|
238
|
|
|
|
|
239
|
1 |
|
return $this; |
|
240
|
|
|
} |
|
241
|
|
|
|
|
242
|
|
|
/** |
|
243
|
|
|
* Get updatedAt |
|
244
|
|
|
* |
|
245
|
|
|
* @return \DateTime |
|
246
|
|
|
*/ |
|
247
|
1 |
|
public function getUpdatedAt() |
|
248
|
|
|
{ |
|
249
|
1 |
|
return $this->updatedAt; |
|
250
|
|
|
} |
|
251
|
|
|
|
|
252
|
|
|
/** |
|
253
|
|
|
* @ORM\PrePersist |
|
254
|
|
|
*/ |
|
255
|
1 |
|
public function prePersist() |
|
256
|
|
|
{ |
|
257
|
1 |
|
$this->createdAt = new \DateTime(); |
|
258
|
1 |
|
} |
|
259
|
|
|
|
|
260
|
|
|
/** |
|
261
|
|
|
* @ORM\PreUpdate |
|
262
|
|
|
*/ |
|
263
|
1 |
|
public function preUpdate() |
|
264
|
|
|
{ |
|
265
|
1 |
|
$this->updatedAt = new \DateTime(); |
|
266
|
1 |
|
} |
|
267
|
|
|
|
|
268
|
|
|
/** |
|
269
|
|
|
* Set status |
|
270
|
|
|
* |
|
271
|
|
|
* @param string $status |
|
272
|
|
|
* |
|
273
|
|
|
* @return GamePlayer |
|
274
|
|
|
*/ |
|
275
|
1 |
|
public function setStatus($status) |
|
276
|
|
|
{ |
|
277
|
1 |
|
$this->status = $status; |
|
278
|
|
|
|
|
279
|
1 |
|
return $this; |
|
280
|
|
|
} |
|
281
|
|
|
|
|
282
|
|
|
/** |
|
283
|
|
|
* Get status |
|
284
|
|
|
* |
|
285
|
|
|
* @return string |
|
286
|
|
|
*/ |
|
287
|
1 |
|
public function getStatus() |
|
288
|
|
|
{ |
|
289
|
1 |
|
return $this->status; |
|
290
|
|
|
} |
|
291
|
|
|
} |
|
292
|
|
|
|
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