1 | <?php |
||
9 | class Client |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var TransportInterface |
||
14 | */ |
||
15 | protected $transport; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $client_id; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $redirect_uri; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $client_secret; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | protected $force_relogin; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $access_token; |
||
41 | |||
42 | /* |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $api_url; |
||
46 | |||
47 | // --- NEW -- |
||
48 | |||
49 | /** |
||
50 | * @var array |
||
51 | */ |
||
52 | protected $resources = []; |
||
53 | |||
54 | /** |
||
55 | * @var Resource\Auth |
||
56 | */ |
||
57 | public $auth; |
||
58 | |||
59 | /** |
||
60 | * @var Resource\Game |
||
61 | */ |
||
62 | public $games; |
||
63 | |||
64 | /** |
||
65 | * @var Resource\Root |
||
66 | */ |
||
67 | public $root; |
||
68 | |||
69 | /** |
||
70 | * @var Resource\Teams |
||
71 | */ |
||
72 | public $teams; |
||
73 | |||
74 | /** |
||
75 | * @var Resource\Videos |
||
76 | */ |
||
77 | public $videos; |
||
78 | |||
79 | /** |
||
80 | * @var Resource\Ingests |
||
81 | */ |
||
82 | public $ingests; |
||
83 | |||
84 | /** |
||
85 | * Client constructor. |
||
86 | */ |
||
87 | public function __construct() |
||
260 | |||
261 | /** |
||
262 | * @param string $name |
||
263 | * @param Resource\ResourceAbstract $instance |
||
264 | */ |
||
265 | public function registerResource($name="", Resource\ResourceAbstract $instance) { |
||
268 | |||
269 | /** |
||
270 | * @return array |
||
271 | */ |
||
272 | public function getSupportedFunctions() { |
||
275 | |||
276 | /* -- Setters */ |
||
277 | |||
278 | |||
279 | /** |
||
280 | * @param $client_id |
||
281 | * @return $this |
||
282 | */ |
||
283 | public function setClientId($client_id) |
||
288 | |||
289 | |||
290 | /** |
||
291 | * @param $redirect_uri |
||
292 | * @return $this |
||
293 | */ |
||
294 | public function setRedirectUri($redirect_uri) |
||
299 | |||
300 | |||
301 | /** |
||
302 | * @param $client_secret |
||
303 | * @return $this |
||
304 | */ |
||
305 | public function setClientSecret($client_secret) |
||
310 | |||
311 | |||
312 | /** |
||
313 | * @param $api_url |
||
314 | * @return $this |
||
315 | */ |
||
316 | public function setApiUrl($api_url) |
||
321 | |||
322 | |||
323 | /** |
||
324 | * @param $force_relogin |
||
325 | * @return $this |
||
326 | */ |
||
327 | public function setForceRelogin($force_relogin) |
||
332 | |||
333 | |||
334 | /** |
||
335 | * @param $access_token |
||
336 | */ |
||
337 | public function setAccessToken($access_token) |
||
341 | |||
342 | |||
343 | /* -- Getters */ |
||
344 | |||
345 | /** |
||
346 | * @return string |
||
347 | */ |
||
348 | public function getClientId() |
||
352 | |||
353 | /** |
||
354 | * @return string |
||
355 | */ |
||
356 | public function getRedirectUri() |
||
360 | |||
361 | /** |
||
362 | * @return string |
||
363 | */ |
||
364 | public function getClientSecret() |
||
368 | |||
369 | /** |
||
370 | * @return string |
||
371 | */ |
||
372 | public function getApiUrl() |
||
376 | |||
377 | /** |
||
378 | * @return boolean |
||
379 | */ |
||
380 | public function isForceRelogin() |
||
384 | |||
385 | /** |
||
386 | * @return string |
||
387 | */ |
||
388 | public function getAccessToken() |
||
392 | |||
393 | /** |
||
394 | * @return AuthModel |
||
395 | */ |
||
396 | public function getAuthModel() { |
||
399 | |||
400 | /** |
||
401 | * Get transport |
||
402 | * |
||
403 | * @return TransportInterface Transport |
||
404 | */ |
||
405 | public function getTransport() |
||
413 | |||
414 | /** |
||
415 | * Set transport |
||
416 | * |
||
417 | * @param TransportInterface $transport Transport |
||
418 | * |
||
419 | * @return self This object |
||
420 | */ |
||
421 | public function setTransport(TransportInterface $transport) |
||
426 | |||
427 | } |
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..