1 | <?php namespace Bogstag\OAuth2\Client\Provider; |
||
9 | class Trakt extends AbstractProvider |
||
10 | { |
||
11 | |||
12 | use BearerAuthorizationTrait; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $baseUrlApi = 'https://api.trakt.tv'; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $basUrl = 'https://trakt.tv'; |
||
23 | |||
24 | protected $traktApiVersion = 2; |
||
25 | |||
26 | /** |
||
27 | * Get authorization url to begin OAuth flow |
||
28 | * As noted in api docs you should use the normal url not the api url. |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getBaseAuthorizationUrl() |
||
36 | |||
37 | /** |
||
38 | * @inheritDoc |
||
39 | */ |
||
40 | public function getBaseAccessTokenUrl(array $params) |
||
44 | |||
45 | /** |
||
46 | * @inheritDoc |
||
47 | */ |
||
48 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
||
52 | |||
53 | /** |
||
54 | * {@inheritDoc} |
||
55 | */ |
||
56 | public function getHeaders($token = null) |
||
66 | |||
67 | /** |
||
68 | * @inheritDoc |
||
69 | */ |
||
70 | protected function getDefaultScopes() |
||
74 | |||
75 | /** |
||
76 | * @inheritDoc |
||
77 | */ |
||
78 | protected function checkResponse(ResponseInterface $response, $data) |
||
85 | |||
86 | /** |
||
87 | * @inheritDoc |
||
88 | */ |
||
89 | protected function createResourceOwner(array $response, AccessToken $token) |
||
93 | |||
94 | } |
||
95 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: