1 | <?php |
||
11 | class Qivivo extends AbstractProvider |
||
12 | { |
||
13 | |||
14 | const SCOPE_USER_BASIC_INFORMATION = 'user_basic_information'; |
||
15 | const SCOPE_READ_DEVICES = 'read_devices'; |
||
16 | const SCOPE_READ_THERMOSTATS = 'read_thermostats'; |
||
17 | const SCOPE_READ_WIRELESS_MODULES = 'read_wireless_modules'; |
||
18 | const SCOPE_READ_PROGRAMMATION = 'read_programmation'; |
||
19 | const SCOPE_UPDATE_PROGRAMMATION = 'update_programmation'; |
||
20 | const SCOPE_READ_HOUSE_DATA = 'read_house_data'; |
||
21 | const SCOPE_UPDATE_HOUSE_SETTINGS = 'update_house_settings'; |
||
22 | |||
23 | use BearerAuthorizationTrait; |
||
24 | |||
25 | /** |
||
26 | * Get authorization url to begin OAuth flow |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | 6 | public function getBaseAuthorizationUrl() |
|
34 | |||
35 | /** |
||
36 | * Get access token url to retrieve token |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | 4 | public function getBaseAccessTokenUrl(array $params) |
|
44 | |||
45 | /** |
||
46 | * Get provider url to fetch user details |
||
47 | * |
||
48 | * @param AccessToken $token |
||
49 | * |
||
50 | * @return string |
||
51 | * |
||
52 | * @throws Exception\ResourceOwnerException |
||
53 | */ |
||
54 | 2 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
58 | |||
59 | /** |
||
60 | * Get the default scopes used by this provider. |
||
61 | * |
||
62 | * This should not be a complete list of all scopes, but the minimum |
||
63 | * required for the provider user interface! |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | 4 | protected function getDefaultScopes() |
|
74 | |||
75 | /** |
||
76 | * Returns the string that should be used to separate scopes when building |
||
77 | * the URL for requesting an access token. |
||
78 | * |
||
79 | * @return string Scope separator, defaults to ',' |
||
80 | */ |
||
81 | 6 | protected function getScopeSeparator() |
|
85 | |||
86 | /** |
||
87 | * Check a provider response for errors. |
||
88 | * |
||
89 | * @throws IdentityProviderException |
||
90 | * @param ResponseInterface $response |
||
91 | * @param string $data Parsed response data |
||
92 | * @return void |
||
93 | */ |
||
94 | 2 | protected function checkResponse(ResponseInterface $response, $data) |
|
105 | /** |
||
106 | * Generate a user object from a successful user details request. |
||
107 | * |
||
108 | * @param object $response |
||
109 | * @param AccessToken $token |
||
110 | * @return \League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
111 | * |
||
112 | * @throws Exception\ResourceOwnerException |
||
113 | */ |
||
114 | 2 | protected function createResourceOwner(array $response, AccessToken $token) |
|
118 | } |
||
119 |
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: