1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
9 | class Paypal extends AbstractProvider |
||
10 | { |
||
11 | use BearerAuthorizationTrait; |
||
12 | |||
13 | /** |
||
14 | * Client is in sandbox mode |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $isSandbox = false; |
||
19 | |||
20 | /** |
||
21 | * Creates and returns api base url base on client configuration. |
||
22 | * |
||
23 | * @return string |
||
24 | */ |
||
25 | 10 | protected function getApiUrl() |
|
29 | |||
30 | /** |
||
31 | * Creates and returns web app base url base on client configuration. |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 10 | protected function getWebAppUrl() |
|
39 | |||
40 | /** |
||
41 | * Get authorization url to begin OAuth flow |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 10 | public function getBaseAuthorizationUrl() |
|
49 | |||
50 | /** |
||
51 | * Get access token url to retrieve token |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 10 | public function getBaseAccessTokenUrl(array $params) |
|
59 | |||
60 | /** |
||
61 | * Get provider url to fetch user details |
||
62 | * |
||
63 | * @param AccessToken $token |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | 2 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
71 | |||
72 | /** |
||
73 | * Get the default scopes used by this provider. |
||
74 | * |
||
75 | * This should not be a complete list of all scopes, but the minimum |
||
76 | * required for the provider user interface! |
||
77 | * |
||
78 | * @return string[] |
||
79 | */ |
||
80 | 8 | protected function getDefaultScopes() |
|
84 | |||
85 | /** |
||
86 | * Returns the string that should be used to separate scopes when building |
||
87 | * the URL for requesting an access token. |
||
88 | * |
||
89 | * @return string Scope separator, defaults to ',' |
||
90 | */ |
||
91 | 10 | protected function getScopeSeparator() |
|
95 | |||
96 | /** |
||
97 | * Check a provider response for errors. |
||
98 | * |
||
99 | * @throws IdentityProviderException |
||
100 | * @param ResponseInterface $response |
||
101 | * @param string $data Parsed response data |
||
102 | * @return void |
||
103 | */ |
||
104 | 6 | protected function checkResponse(ResponseInterface $response, $data) |
|
115 | |||
116 | /** |
||
117 | * Generate a user object from a successful user details request. |
||
118 | * |
||
119 | * @param object $response |
||
120 | * @param AccessToken $token |
||
121 | * @return PaypalResourceOwner |
||
122 | */ |
||
123 | 2 | protected function createResourceOwner(array $response, AccessToken $token) |
|
127 | } |
||
128 |
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: