1 | <?php |
||
24 | class Gumroad extends AbstractProvider |
||
25 | { |
||
26 | use BearerAuthorizationTrait; |
||
27 | |||
28 | /** |
||
29 | * API Domain |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | public $apiDomain = 'https://gumroad.com'; |
||
34 | |||
35 | /** |
||
36 | * Get authorization URL to begin OAuth flow |
||
37 | * Note: Gumroad does not use /oauth2/ for url path of OAuth2! |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | 9 | public function getBaseAuthorizationUrl() |
|
45 | |||
46 | /** |
||
47 | * Get access token URL to retrieve token |
||
48 | * Note: Gumroad does not use /oauth2/ for url path of OAuth2! |
||
49 | * |
||
50 | * @param array $params |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 15 | public function getBaseAccessTokenUrl(array $params) |
|
58 | |||
59 | /** |
||
60 | * Get provider URL to retrieve user details |
||
61 | * |
||
62 | * @param AccessToken $token |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | 3 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
70 | |||
71 | /** |
||
72 | * Returns the string that should be used to separate scopes when building |
||
73 | * the URL for requesting an access token. |
||
74 | * |
||
75 | * Discord's scope separator is space (%20) |
||
76 | * |
||
77 | * @return string Scope separator |
||
78 | */ |
||
79 | 9 | protected function getScopeSeparator() |
|
83 | |||
84 | /** |
||
85 | * Get the default scopes used by this provider. |
||
86 | * |
||
87 | * This should not be a complete list of all scopes, but the minimum |
||
88 | * required for the provider user interface! |
||
89 | * |
||
90 | * @return array |
||
91 | */ |
||
92 | 6 | protected function getDefaultScopes() |
|
96 | |||
97 | /** |
||
98 | * Check a provider response for errors. |
||
99 | * |
||
100 | * @throws \League\OAuth2\Client\Provider\Exception\IdentityProviderException |
||
101 | * @param ResponseInterface $response |
||
102 | * @param array $data Parsed response data |
||
103 | * @return void |
||
104 | */ |
||
105 | 12 | protected function checkResponse(ResponseInterface $response, $data) |
|
113 | |||
114 | /** |
||
115 | * Generate a user object from a successful user details request. |
||
116 | * |
||
117 | * @param array $response |
||
118 | * @param AccessToken $token |
||
119 | * @return \League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
120 | */ |
||
121 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
125 | } |
||
126 |
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: