1 | <?php |
||
12 | class MusicInfo |
||
13 | { |
||
14 | /** |
||
15 | * @var ClientInterface |
||
16 | */ |
||
17 | protected $client; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $services; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $config; |
||
28 | |||
29 | /** |
||
30 | * Supported Services |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $supportedServices = []; |
||
34 | |||
35 | /** |
||
36 | * MusicInfo constructor. |
||
37 | * @param $config |
||
38 | * @throws ServiceConfigurationException if musicinfo.service is missing |
||
39 | */ |
||
40 | 10 | public function __construct($config) |
|
63 | |||
64 | /** |
||
65 | * @param $configDirectory |
||
66 | */ |
||
67 | public function loadConfig($configDirectory) |
||
72 | |||
73 | /** |
||
74 | * @param ClientInterface $client |
||
75 | * |
||
76 | * @return $this |
||
77 | */ |
||
78 | 10 | public function setClient(ClientInterface $client) |
|
84 | |||
85 | /** |
||
86 | * @return ClientInterface |
||
87 | */ |
||
88 | 10 | public function getClient() |
|
92 | |||
93 | /** |
||
94 | * Load service |
||
95 | * |
||
96 | * @param $service |
||
97 | * @param $init |
||
98 | * |
||
99 | * @return IMusicService |
||
100 | * |
||
101 | * @throws \Exception |
||
102 | */ |
||
103 | 10 | public function loadService($service, $init = false) |
|
120 | |||
121 | /** |
||
122 | * Merge shared config with service specific configuration |
||
123 | * |
||
124 | * @param $service |
||
125 | * @return array |
||
126 | */ |
||
127 | 10 | public function mergeConfig($service) |
|
140 | |||
141 | /** |
||
142 | * Load all services |
||
143 | * |
||
144 | * @return bool|ArrayCollection |
||
145 | */ |
||
146 | 1 | public function loadServices() |
|
154 | |||
155 | /** |
||
156 | * @param IMusicService $service |
||
157 | * |
||
158 | * @return $this |
||
159 | */ |
||
160 | 10 | public function addService(IMusicService $service, $key) |
|
165 | |||
166 | /** |
||
167 | * @return ArrayCollection |
||
168 | */ |
||
169 | 10 | public function getServices() |
|
173 | |||
174 | /** |
||
175 | * @param $key |
||
176 | * @return IMusicService|null |
||
177 | */ |
||
178 | 4 | public function getService($key) |
|
187 | |||
188 | /** |
||
189 | * @param BaseService $service |
||
190 | * |
||
191 | * @return BaseService |
||
192 | * @throws ServiceConfigurationException |
||
193 | */ |
||
194 | 3 | public function initializeService(BaseService $service) |
|
202 | |||
203 | /** |
||
204 | * @param string $key |
||
205 | * |
||
206 | * @return $this |
||
207 | */ |
||
208 | 1 | public function removeService($key) |
|
216 | |||
217 | /** |
||
218 | * @return IMusicService |
||
219 | */ |
||
220 | public function getPreferredService() |
||
224 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..