1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
9 | class Heroku extends AbstractProvider |
||
10 | { |
||
11 | use BearerAuthorizationTrait; |
||
12 | |||
13 | /** |
||
14 | * @var string Key used in a token response to identify the resource owner. |
||
15 | */ |
||
16 | const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'user_id'; |
||
17 | |||
18 | /** |
||
19 | * Get authorization url to begin OAuth flow |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | 6 | public function getBaseAuthorizationUrl() |
|
27 | |||
28 | /** |
||
29 | * Get access token url to retrieve token |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | 8 | public function getBaseAccessTokenUrl(array $params) |
|
37 | |||
38 | /** |
||
39 | * Get provider url to fetch user details |
||
40 | * |
||
41 | * @param AccessToken $token |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 2 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
49 | |||
50 | /** |
||
51 | * Get the default scopes used by this provider. |
||
52 | * |
||
53 | * This should not be a complete list of all scopes, but the minimum |
||
54 | * required for the provider user interface! |
||
55 | * |
||
56 | * @return array |
||
57 | */ |
||
58 | 4 | protected function getDefaultScopes() |
|
62 | |||
63 | /** |
||
64 | * Returns the string that should be used to separate scopes when building |
||
65 | * the URL for requesting an access token. |
||
66 | * |
||
67 | * @return string Scope separator, defaults to ',' |
||
68 | */ |
||
69 | 6 | protected function getScopeSeparator() |
|
73 | |||
74 | /** |
||
75 | * Check a provider response for errors. |
||
76 | * |
||
77 | * @throws IdentityProviderException |
||
78 | * @param ResponseInterface $response |
||
79 | * @param string $data Parsed response data |
||
80 | * @return void |
||
81 | */ |
||
82 | 6 | protected function checkResponse(ResponseInterface $response, $data) |
|
93 | |||
94 | /** |
||
95 | * Generate a user object from a successful user details request. |
||
96 | * |
||
97 | * @param object $response |
||
98 | * @param AccessToken $token |
||
99 | * @return HerokuResourceOwner |
||
100 | */ |
||
101 | 2 | protected function createResourceOwner(array $response, AccessToken $token) |
|
105 | } |
||
106 |
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: