1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
10 | class Bitbucket extends AbstractProvider |
||
11 | { |
||
12 | use ArrayAccessorTrait, |
||
13 | BearerAuthorizationTrait; |
||
14 | |||
15 | /** |
||
16 | * Get authorization url to begin OAuth flow |
||
17 | * |
||
18 | * @return string |
||
19 | */ |
||
20 | 9 | public function getBaseAuthorizationUrl() |
|
24 | |||
25 | /** |
||
26 | * Get access token url to retrieve token |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
34 | |||
35 | /** |
||
36 | * Get provider url to fetch user details |
||
37 | * |
||
38 | * @param AccessToken $token |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 6 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
46 | |||
47 | /** |
||
48 | * Get the default scopes used by this provider. |
||
49 | * |
||
50 | * This should not be a complete list of all scopes, but the minimum |
||
51 | * required for the provider user interface! |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | 6 | protected function getDefaultScopes() |
|
59 | |||
60 | /** |
||
61 | * Returns the string that should be used to separate scopes when building |
||
62 | * the URL for requesting an access token. |
||
63 | * |
||
64 | * @return string Scope separator, defaults to ' ' |
||
65 | */ |
||
66 | 9 | protected function getScopeSeparator() |
|
70 | |||
71 | /** |
||
72 | * Check a provider response for errors. |
||
73 | * |
||
74 | * @throws IdentityProviderException |
||
75 | * @param ResponseInterface $response |
||
76 | * @param string $data Parsed response data |
||
77 | * @return void |
||
78 | */ |
||
79 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
92 | |||
93 | /** |
||
94 | * Generate a user object from a successful user details request. |
||
95 | * |
||
96 | * @param object $response |
||
97 | * @param AccessToken $token |
||
98 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
99 | */ |
||
100 | 6 | protected function createResourceOwner(array $response, AccessToken $token) |
|
104 | |||
105 | /** |
||
106 | * Returns a prepared request for requesting an access token. |
||
107 | * |
||
108 | * @param array $params Query string parameters |
||
109 | * @return Psr\Http\Message\RequestInterface |
||
110 | */ |
||
111 | 9 | protected function getAccessTokenRequest(array $params) |
|
119 | } |
||
120 |
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: