1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
8 | class Elance extends AbstractProvider |
||
9 | { |
||
10 | /** |
||
11 | * Get authorization url to begin OAuth flow |
||
12 | * |
||
13 | * @return string |
||
14 | */ |
||
15 | 12 | public function getBaseAuthorizationUrl() |
|
19 | |||
20 | /** |
||
21 | * Get access token url to retrieve token |
||
22 | * |
||
23 | * @return string |
||
24 | */ |
||
25 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
29 | |||
30 | /** |
||
31 | * Get provider url to fetch user details |
||
32 | * |
||
33 | * @param AccessToken $token |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 6 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
41 | |||
42 | /** |
||
43 | * Get the default scopes used by this provider. |
||
44 | * |
||
45 | * This should not be a complete list of all scopes, but the minimum |
||
46 | * required for the provider user interface! |
||
47 | * |
||
48 | * @return string[] |
||
49 | */ |
||
50 | 9 | protected function getDefaultScopes() |
|
54 | |||
55 | /** |
||
56 | * Prepares an parsed access token response for a grant. |
||
57 | * |
||
58 | * Custom mapping of expiration, etc should be done here. Always call the |
||
59 | * parent method when overloading this method. |
||
60 | * |
||
61 | * @param mixed $result |
||
62 | * @return array |
||
63 | */ |
||
64 | 9 | protected function prepareAccessTokenResponse(array $result) |
|
72 | |||
73 | /** |
||
74 | * Check a provider response for errors. |
||
75 | * |
||
76 | * @throws IdentityProviderException |
||
77 | * @param ResponseInterface $response |
||
78 | * @param string $data Parsed response data |
||
79 | * @return void |
||
80 | */ |
||
81 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
91 | |||
92 | /** |
||
93 | * Generate a user object from a successful user details request. |
||
94 | * |
||
95 | * @param object $response |
||
96 | * @param AccessToken $token |
||
97 | * @return ElanceResourceOwner |
||
98 | */ |
||
99 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
103 | } |
||
104 |
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: