1 | <?php namespace Nilesuan\OAuth2\Client\Provider; |
||
10 | class Thirtysevensignals 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 | * Builds the authorization URL's query string. |
||
27 | * |
||
28 | * @param array $params Query parameters |
||
29 | * @return string Query string |
||
30 | */ |
||
31 | 9 | protected function getAuthorizationQuery(array $params) |
|
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 | * Returns the request body for requesting an access token. |
||
49 | * |
||
50 | * @param array $params |
||
51 | * @return string |
||
52 | */ |
||
53 | 9 | protected function getAccessTokenBody(array $params) |
|
58 | |||
59 | /** |
||
60 | * Get provider url to fetch user details |
||
61 | * |
||
62 | * @param AccessToken $token |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | 6 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
70 | |||
71 | /** |
||
72 | * Get the default scopes used by this provider. |
||
73 | * |
||
74 | * This should not be a complete list of all scopes, but the minimum |
||
75 | * required for the provider user interface! |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | 6 | protected function getDefaultScopes() |
|
83 | |||
84 | /** |
||
85 | * Check a provider response for errors. |
||
86 | * |
||
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) |
|
106 | |||
107 | /** |
||
108 | * Generate a user object from a successful user details request. |
||
109 | * |
||
110 | * @param object $response |
||
111 | * @param AccessToken $token |
||
112 | * @return ThirtysevensignalsResourceOwner |
||
113 | */ |
||
114 | 6 | protected function createResourceOwner(array $response, AccessToken $token) |
|
118 | |||
119 | /** |
||
120 | * Returns a prepared request for requesting an access token. |
||
121 | * |
||
122 | * @param array $params Query string parameters |
||
123 | * @return \GuzzleHttp\Psr7\Request |
||
124 | */ |
||
125 | 9 | protected function getAccessTokenRequest(array $params) |
|
133 | } |
||
134 |
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: