1 | <?php |
||
18 | class Track extends TrackEndpoint implements IMusicServiceEndpoint |
||
19 | { |
||
20 | const DATA_SOURCE = 'vocadb'; |
||
21 | |||
22 | protected $parent; |
||
23 | |||
24 | /** |
||
25 | * @param $apiService |
||
26 | * |
||
27 | * @return Track |
||
28 | */ |
||
29 | public function setParent($apiService) |
||
35 | |||
36 | /** |
||
37 | * Transform single item to model |
||
38 | * |
||
39 | * @param VocaDBTrackModel $raw |
||
40 | * |
||
41 | * @return BaseModel |
||
42 | */ |
||
43 | 2 | public function transformSingle($raw) |
|
55 | |||
56 | /** |
||
57 | * Transform collection to models |
||
58 | * |
||
59 | * @param $raw |
||
60 | * |
||
61 | * @return ArrayCollection |
||
62 | */ |
||
63 | 2 | public function transformCollection($raw) |
|
72 | |||
73 | /** |
||
74 | * Transform to models |
||
75 | * |
||
76 | * @param $raw |
||
77 | * |
||
78 | * @return ArrayCollection |
||
79 | */ |
||
80 | 2 | public function transform($raw) |
|
84 | |||
85 | /** |
||
86 | * @return mixed |
||
87 | */ |
||
88 | public function getParent() |
||
92 | |||
93 | /** |
||
94 | * @param $guid |
||
95 | * |
||
96 | * @return ArrayCollection |
||
97 | */ |
||
98 | public function getByGuid($guid, $complete = true) |
||
102 | |||
103 | 2 | public function getByName($name, $complete = true) |
|
107 | } |
||
108 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.