1 | <?php namespace FVJM\OAuth2\Client\Provider; |
||
9 | class Ahoi extends AbstractProvider |
||
10 | { |
||
11 | use BearerAuthorizationTrait; |
||
12 | |||
13 | /** |
||
14 | * Default scopes |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | public $defaultScopes = []; |
||
19 | |||
20 | /** |
||
21 | * Ahoi Instance URL version |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $ahoiInstanceUrl; |
||
26 | /** |
||
27 | * Get authorization url to begin OAuth flow |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | 9 | public function getBaseAuthorizationUrl() |
|
35 | |||
36 | /** |
||
37 | * Get access token url to retrieve token |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
45 | |||
46 | /** |
||
47 | * Get provider url to fetch user details |
||
48 | * |
||
49 | * @param AccessToken $token |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | 3 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
57 | |||
58 | /** |
||
59 | * Get the default scopes used by this provider. |
||
60 | * |
||
61 | * This should not be a complete list of all scopes, but the minimum |
||
62 | * required for the provider user interface! |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | 6 | protected function getDefaultScopes() |
|
70 | |||
71 | /** |
||
72 | * Returns the string that should be used to separate scopes when building |
||
73 | * the URL for requesting an access token. |
||
74 | * |
||
75 | * @return string Scope separator, defaults to ' ' |
||
76 | */ |
||
77 | 9 | protected function getScopeSeparator() |
|
81 | |||
82 | /** |
||
83 | * Check a provider response for errors. |
||
84 | * |
||
85 | * @link https://api.ahoi.cloud/ |
||
86 | * @throws IdentityProviderException |
||
87 | * @param ResponseInterface $response |
||
88 | * @param string $data Parsed response data |
||
89 | * @return void |
||
90 | */ |
||
91 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
103 | |||
104 | /** |
||
105 | * Generate a user object from a successful user details request. |
||
106 | * |
||
107 | * @param object $response |
||
108 | * @param AccessToken $token |
||
109 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
110 | */ |
||
111 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
115 | } |
||
116 |
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: