1 | <?php |
||
22 | class TradingCardCard implements InputFilterAwareInterface, \JsonSerializable |
||
23 | { |
||
24 | protected $inputFilter; |
||
25 | |||
26 | /** |
||
27 | * @ORM\Id |
||
28 | * @ORM\Column(type="integer"); |
||
29 | * @ORM\GeneratedValue(strategy="AUTO") |
||
30 | */ |
||
31 | protected $id; |
||
32 | |||
33 | /** |
||
34 | * @ORM\ManyToOne(targetEntity="Game", cascade={"persist","remove"}) |
||
35 | * @ORM\JoinColumn(name="game_id", referencedColumnName="id", onDelete="CASCADE") |
||
36 | **/ |
||
37 | protected $game; |
||
38 | |||
39 | /** |
||
40 | * @ORM\ManyToOne(targetEntity="PlaygroundUser\Entity\User") |
||
41 | * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") |
||
42 | **/ |
||
43 | protected $user; |
||
44 | |||
45 | /** |
||
46 | * @ORM\ManyToOne(targetEntity="Entry") |
||
47 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="CASCADE") |
||
48 | **/ |
||
49 | protected $entry; |
||
50 | |||
51 | /** |
||
52 | * @ORM\ManyToOne(targetEntity="TradingCardModel") |
||
53 | * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="CASCADE") |
||
54 | **/ |
||
55 | protected $model; |
||
56 | |||
57 | /** |
||
58 | * @ORM\Column(type="string", length=255, nullable=true) |
||
59 | */ |
||
60 | protected $media; |
||
61 | |||
62 | /** |
||
63 | * @ORM\Column(name="json_data", type="text", nullable=true) |
||
64 | */ |
||
65 | protected $jsonData; |
||
66 | |||
67 | /** |
||
68 | * @ORM\Column(name="created_at", type="datetime") |
||
69 | */ |
||
70 | protected $createdAt; |
||
71 | |||
72 | /** |
||
73 | * @ORM\Column(name="updated_at",type="datetime") |
||
74 | */ |
||
75 | protected $updatedAt; |
||
76 | |||
77 | /** @PrePersist */ |
||
78 | public function createChrono() |
||
83 | |||
84 | /** @PreUpdate */ |
||
85 | public function updateChrono() |
||
89 | |||
90 | /** |
||
91 | * Gets the value of id. |
||
92 | * |
||
93 | * @return mixed |
||
94 | */ |
||
95 | public function getId() |
||
99 | |||
100 | /** |
||
101 | * Sets the value of id. |
||
102 | * |
||
103 | * @param mixed $id the id |
||
104 | * |
||
105 | * @return self |
||
106 | */ |
||
107 | public function setId($id) |
||
113 | |||
114 | /** |
||
115 | * Gets the value of game. |
||
116 | * |
||
117 | * @return mixed |
||
118 | */ |
||
119 | public function getGame() |
||
123 | |||
124 | /** |
||
125 | * Sets the value of game. |
||
126 | * |
||
127 | * @param mixed $game the game |
||
128 | * |
||
129 | * @return self |
||
130 | */ |
||
131 | public function setGame($game) |
||
137 | |||
138 | /** |
||
139 | * Gets the value of user. |
||
140 | * |
||
141 | * @return mixed |
||
142 | */ |
||
143 | public function getUser() |
||
147 | |||
148 | /** |
||
149 | * Sets the value of user. |
||
150 | * |
||
151 | * @param mixed $user the user |
||
152 | * |
||
153 | * @return self |
||
154 | */ |
||
155 | public function setUser($user) |
||
161 | |||
162 | /** |
||
163 | * Gets the value of entry. |
||
164 | * |
||
165 | * @return mixed |
||
166 | */ |
||
167 | public function getEntry() |
||
171 | |||
172 | /** |
||
173 | * Sets the value of entry. |
||
174 | * |
||
175 | * @param mixed $entry the entry |
||
176 | * |
||
177 | * @return self |
||
178 | */ |
||
179 | public function setEntry($entry) |
||
185 | |||
186 | /** |
||
187 | * Gets the value of model. |
||
188 | * |
||
189 | * @return mixed |
||
190 | */ |
||
191 | public function getModel() |
||
195 | |||
196 | /** |
||
197 | * Sets the value of model. |
||
198 | * |
||
199 | * @param mixed $model the model |
||
200 | * |
||
201 | * @return self |
||
202 | */ |
||
203 | public function setModel($model) |
||
209 | |||
210 | /** |
||
211 | * Gets the value of media. |
||
212 | * |
||
213 | * @return mixed |
||
214 | */ |
||
215 | public function getMedia() |
||
219 | |||
220 | /** |
||
221 | * Sets the value of media. |
||
222 | * |
||
223 | * @param mixed $media the media |
||
224 | * |
||
225 | * @return self |
||
226 | */ |
||
227 | public function setMedia($media) |
||
233 | |||
234 | /** |
||
235 | * Gets the value of jsonData. |
||
236 | * |
||
237 | * @return mixed |
||
238 | */ |
||
239 | public function getJsonData() |
||
243 | |||
244 | /** |
||
245 | * Sets the value of jsonData. |
||
246 | * |
||
247 | * @param mixed $jsonData the json data |
||
248 | * |
||
249 | * @return self |
||
250 | */ |
||
251 | public function setJsonData($jsonData) |
||
257 | |||
258 | /** |
||
259 | * Gets the value of createdAt. |
||
260 | * |
||
261 | * @return mixed |
||
262 | */ |
||
263 | public function getCreatedAt() |
||
267 | |||
268 | /** |
||
269 | * Sets the value of createdAt. |
||
270 | * |
||
271 | * @param mixed $createdAt the created at |
||
272 | * |
||
273 | * @return self |
||
274 | */ |
||
275 | public function setCreatedAt($createdAt) |
||
281 | |||
282 | /** |
||
283 | * Gets the value of updatedAt. |
||
284 | * |
||
285 | * @return mixed |
||
286 | */ |
||
287 | public function getUpdatedAt() |
||
291 | |||
292 | /** |
||
293 | * Sets the value of updatedAt. |
||
294 | * |
||
295 | * @param mixed $updatedAt the updated at |
||
296 | * |
||
297 | * @return self |
||
298 | */ |
||
299 | public function setUpdatedAt($updatedAt) |
||
305 | |||
306 | /** |
||
307 | * Convert the object to an array. |
||
308 | * |
||
309 | * @return array |
||
310 | */ |
||
311 | public function getArrayCopy() |
||
317 | |||
318 | /** |
||
319 | * Convert the object to json. |
||
320 | * |
||
321 | * @return array |
||
322 | */ |
||
323 | public function jsonSerialize() |
||
334 | |||
335 | public function setInputFilter(InputFilterInterface $inputFilter) |
||
339 | |||
340 | public function getInputFilter() |
||
351 | } |
||
352 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.