1 | <?php |
||
12 | class Drupal extends AbstractProvider |
||
13 | { |
||
14 | use BearerAuthorizationTrait; |
||
15 | |||
16 | protected $baseUrl; |
||
17 | |||
18 | 21 | public function getBaseUrl() |
|
22 | |||
23 | /** |
||
24 | * Get provider url to run authorization |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | 6 | public function getBaseAuthorizationUrl() |
|
32 | |||
33 | /** |
||
34 | * Returns the base URL for requesting an access token. |
||
35 | * |
||
36 | * @param array $params |
||
37 | * @return string |
||
38 | */ |
||
39 | public function getBaseAccessTokenUrl(array $params) |
||
43 | |||
44 | /** |
||
45 | * Get provider url to fetch user details |
||
46 | * |
||
47 | * @param AccessToken $token |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
||
54 | 3 | ||
55 | /** |
||
56 | * Get the default scopes used by this provider. |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | protected function getDefaultScopes() |
||
64 | 3 | ||
65 | /** |
||
66 | 3 | * Returns the string that should be used to separate scopes when building |
|
67 | 3 | * the URL for requesting an access token. |
|
68 | * |
||
69 | 3 | * @return string Scope separator, defaults to ' ' |
|
70 | */ |
||
71 | protected function getScopeSeparator() |
||
75 | |||
76 | /** |
||
77 | 6 | * Check a provider response for errors. |
|
78 | * |
||
79 | 6 | * @param ResponseInterface $response |
|
80 | * @param array|string $data |
||
81 | * |
||
82 | * @throws IdentityProviderException |
||
83 | */ |
||
84 | protected function checkResponse(ResponseInterface $response, $data) |
||
94 | |||
95 | /** |
||
96 | * Generate a user object from a successful user details request. |
||
97 | * |
||
98 | * @param array $response |
||
99 | * @param AccessToken $token |
||
100 | * |
||
101 | 9 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
|
102 | */ |
||
103 | 9 | protected function createResourceOwner(array $response, AccessToken $token) |
|
107 | } |
||
108 |
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: