@@ -56,16 +56,16 @@ discard block |
||
56 | 56 | { |
57 | 57 | $url = self::API_AUTHORIZE_USER_LOGIN_URL; |
58 | 58 | $url .= '?response_type=code'; |
59 | - $url .= '&redirect_uri=' . $redirectUrl; |
|
60 | - $url .= '&client_id=' . $this->clientId; |
|
61 | - $url .= '&scope=' . $apiScope->getUrlParameters(); |
|
59 | + $url .= '&redirect_uri='.$redirectUrl; |
|
60 | + $url .= '&client_id='.$this->clientId; |
|
61 | + $url .= '&scope='.$apiScope->getUrlParameters(); |
|
62 | 62 | $url .= '&state=oauth2'; |
63 | 63 | |
64 | 64 | return $url; |
65 | 65 | } |
66 | 66 | |
67 | 67 | |
68 | - public function getAccessTokenFromAuthorizedCode(string $redirectUrl, string $code ): AccessToken |
|
68 | + public function getAccessTokenFromAuthorizedCode(string $redirectUrl, string $code): AccessToken |
|
69 | 69 | { |
70 | 70 | $options = [ |
71 | 71 | 'form_params' => [ |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | return $this->accessToken; |
108 | 108 | } |
109 | 109 | |
110 | - public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken |
|
110 | + public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken |
|
111 | 111 | { |
112 | 112 | $accessToken = $accessToken ?? $this->accessToken; |
113 | 113 | $options = [ |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | public function get(string $url, ?array $queryParameters = null): ResponseInterface |
128 | 128 | { |
129 | - $options = array_merge(['headers' => $this->getAuthorizationHeader()], ['query' => $queryParameters]); |
|
129 | + $options = array_merge(['headers' => $this->getAuthorizationHeader()], ['query' => $queryParameters]); |
|
130 | 130 | |
131 | 131 | try { |
132 | 132 | $response = $this->guzzleClient->get($url, $options); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | ] |
148 | 148 | ); |
149 | 149 | |
150 | - $options = array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]); |
|
150 | + $options = array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]); |
|
151 | 151 | |
152 | 152 | return $this->guzzleClient->post($url, $options); |
153 | 153 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | ] |
163 | 163 | ); |
164 | 164 | |
165 | - $options = array_merge(['headers' => $headers], ['body' => $jsonData]); |
|
165 | + $options = array_merge(['headers' => $headers], ['body' => $jsonData]); |
|
166 | 166 | |
167 | 167 | $this->guzzleClient->put($url, $options); |
168 | 168 | } |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | interface IzettleClientInterface |
11 | 11 | { |
12 | 12 | const API_BASE_URL = 'https://oauth.izettle.net'; |
13 | - const API_AUTHORIZE_USER_LOGIN_URL = self::API_BASE_URL . '/authorize'; |
|
13 | + const API_AUTHORIZE_USER_LOGIN_URL = self::API_BASE_URL.'/authorize'; |
|
14 | 14 | |
15 | - const API_ACCESS_TOKEN_REQUEST_URL = self::API_BASE_URL . '/token'; |
|
15 | + const API_ACCESS_TOKEN_REQUEST_URL = self::API_BASE_URL.'/token'; |
|
16 | 16 | const API_ACCESS_TOKEN_PASSWORD_GRANT = 'password'; |
17 | 17 | const API_ACCESS_TOKEN_CODE_GRANT = 'authorization_code'; |
18 | - const API_ACCESS_TOKEN_REFRESH_TOKEN_URL = self::API_BASE_URL . '/token'; |
|
18 | + const API_ACCESS_TOKEN_REFRESH_TOKEN_URL = self::API_BASE_URL.'/token'; |
|
19 | 19 | const API_ACCESS_TOKEN_REFRESH_TOKEN_GRANT = 'refresh_token'; |
20 | 20 | |
21 | 21 | public function setAccessToken(AccessToken $accessToken): void; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function getAccessTokenFromUserLogin(string $username, string $password): AccessToken; |
26 | 26 | |
27 | - public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken; |
|
27 | + public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken; |
|
28 | 28 | |
29 | 29 | public function get(string $url, ?array $queryParameters = null): ResponseInterface; |
30 | 30 |