1 | <?php |
||
9 | class Instagram extends AbstractProvider |
||
10 | { |
||
11 | /** |
||
12 | * @var string Key used in a token response to identify the resource owner. |
||
13 | */ |
||
14 | const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'user.id'; |
||
15 | |||
16 | /** |
||
17 | * Default scopes |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | public $defaultScopes = ['basic']; |
||
22 | |||
23 | /** |
||
24 | * Get the string used to separate scopes. |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | 6 | protected function getScopeSeparator() |
|
32 | |||
33 | /** |
||
34 | * Get authorization url to begin OAuth flow |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | 6 | public function getBaseAuthorizationUrl() |
|
42 | |||
43 | /** |
||
44 | * Get access token url to retrieve token |
||
45 | * |
||
46 | * @param array $params |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
54 | |||
55 | /** |
||
56 | * Get provider url to fetch user details |
||
57 | * |
||
58 | * @param AccessToken $token |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | 2 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
66 | |||
67 | 4 | public function getAuthenticatedRequest($method, $url, $token, array $options = []) |
|
86 | |||
87 | /** |
||
88 | * Get the default scopes used by this provider. |
||
89 | * |
||
90 | * This should not be a complete list of all scopes, but the minimum |
||
91 | * required for the provider user interface! |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | 4 | protected function getDefaultScopes() |
|
99 | |||
100 | /** |
||
101 | * Check a provider response for errors. |
||
102 | * |
||
103 | * @link https://instagram.com/developer/endpoints/ |
||
104 | * @throws IdentityProviderException |
||
105 | * @param ResponseInterface $response |
||
106 | * @param string $data Parsed response data |
||
107 | * @return void |
||
108 | */ |
||
109 | 10 | protected function checkResponse(ResponseInterface $response, $data) |
|
129 | |||
130 | /** |
||
131 | * Generate a user object from a successful user details request. |
||
132 | * |
||
133 | * @param array $response |
||
134 | * @param AccessToken $token |
||
135 | * @return \League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
136 | */ |
||
137 | 2 | protected function createResourceOwner(array $response, AccessToken $token) |
|
141 | } |
||
142 |
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: