1 | <?php |
||
12 | class Imgur extends AbstractProvider |
||
13 | { |
||
14 | use BearerAuthorizationTrait; |
||
15 | |||
16 | /** |
||
17 | * Get authorization url to begin OAuth flow |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | 6 | public function getBaseAuthorizationUrl() |
|
25 | |||
26 | /** |
||
27 | * Get access token url to retrieve token |
||
28 | * |
||
29 | * @param array $params |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
37 | |||
38 | /** |
||
39 | * Get provider url to fetch user details |
||
40 | * |
||
41 | * @param AccessToken $token |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 3 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
49 | |||
50 | /** |
||
51 | * Get the default scopes used by this provider. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | 6 | protected function getDefaultScopes() |
|
59 | |||
60 | /** |
||
61 | * Check a provider response for errors. |
||
62 | * |
||
63 | * @param ResponseInterface $response |
||
64 | * @param array|string $data |
||
65 | * |
||
66 | * @throws IdentityProviderException |
||
67 | */ |
||
68 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
78 | |||
79 | /** |
||
80 | * Generate a user object from a successful user details request. |
||
81 | * |
||
82 | * @param array $response |
||
83 | * @param AccessToken $token |
||
84 | * |
||
85 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
86 | */ |
||
87 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
91 | } |
||
92 |
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: