1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
9 | class Uber extends AbstractProvider |
||
10 | { |
||
11 | use BearerAuthorizationTrait; |
||
12 | |||
13 | /** |
||
14 | * Default scopes |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | public $defaultScopes = []; |
||
19 | |||
20 | /** |
||
21 | * Uber Api version |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | public $version = 'v1'; |
||
26 | |||
27 | /** |
||
28 | * Get authorization url to begin OAuth flow |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | 9 | public function getBaseAuthorizationUrl() |
|
36 | |||
37 | /** |
||
38 | * Get access token url to retrieve token |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
46 | |||
47 | /** |
||
48 | * Get provider url to fetch user details |
||
49 | * |
||
50 | * @param AccessToken $token |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 3 | 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 | 6 | protected function getDefaultScopes() |
|
71 | |||
72 | /** |
||
73 | * Returns the string that should be used to separate scopes when building |
||
74 | * the URL for requesting an access token. |
||
75 | * |
||
76 | * @return string Scope separator, defaults to ' ' |
||
77 | */ |
||
78 | 9 | protected function getScopeSeparator() |
|
82 | |||
83 | /** |
||
84 | * Check a provider response for errors. |
||
85 | * |
||
86 | * @link https://developer.uber.com/v1/api-reference/ |
||
87 | * @throws IdentityProviderException |
||
88 | * @param ResponseInterface $response |
||
89 | * @param string $data Parsed response data |
||
90 | * @return void |
||
91 | */ |
||
92 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
104 | |||
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 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
116 | } |
||
117 |
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: