1 | <?php |
||
10 | class Runkeeper extends AbstractProvider |
||
11 | { |
||
12 | use BearerAuthorizationTrait; |
||
13 | |||
14 | public $domain = 'https://runkeeper.com'; |
||
15 | |||
16 | public $apiDomain = 'https://api.runkeeper.com'; |
||
17 | |||
18 | /** |
||
19 | * Get authorization url to begin OAuth flow |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | 12 | public function getBaseAuthorizationUrl() |
|
27 | |||
28 | /** |
||
29 | * Get access token url to retrieve token |
||
30 | * |
||
31 | * @param array $params |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 15 | public function getBaseAccessTokenUrl(array $params) |
|
39 | |||
40 | /** |
||
41 | * Get provider url to fetch user details |
||
42 | * |
||
43 | * @param AccessToken $token |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | 6 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
51 | |||
52 | /** |
||
53 | * Get provider url to fetch user profile details |
||
54 | * |
||
55 | * @param AccessToken $token |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 6 | public function getResourceOwnerProfileUrl(AccessToken $token) |
|
63 | |||
64 | /** |
||
65 | * @link https://runkeeper.com/developer/healthgraph/registration-authorization |
||
66 | * Get the default scopes used by this provider. |
||
67 | * |
||
68 | * This should not be a complete list of all scopes, but the minimum |
||
69 | * required for the provider user interface! |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | 6 | protected function getDefaultScopes() |
|
77 | |||
78 | /** |
||
79 | * Check a provider response for errors. |
||
80 | * |
||
81 | * @throws IdentityProviderException |
||
82 | * @param ResponseInterface $response |
||
83 | * @param string $data Parsed response data |
||
84 | * @return void |
||
85 | */ |
||
86 | 12 | protected function checkResponse(ResponseInterface $response, $data) |
|
96 | |||
97 | /** |
||
98 | * Requests and returns the resource owner of given access token. |
||
99 | * |
||
100 | * @param AccessToken $token |
||
101 | * @return ResourceOwnerInterface |
||
102 | */ |
||
103 | 3 | public function getResourceOwner(AccessToken $token) |
|
109 | |||
110 | /** |
||
111 | * Requests resource owner details. |
||
112 | * |
||
113 | * @param AccessToken $token |
||
114 | * @return mixed |
||
115 | */ |
||
116 | 3 | protected function fetchResourceOwnerDetails(AccessToken $token) |
|
130 | |||
131 | /** |
||
132 | * Generate a user object from a successful user details request. |
||
133 | * |
||
134 | * @param array $response |
||
135 | * @param AccessToken $token |
||
136 | * @return \League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
137 | */ |
||
138 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
142 | } |
||
143 |
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: