Passed
Pull Request — master (#47)
by
unknown
02:10
created
src/IzettleClientInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 interface IzettleClientInterface
12 12
 {
13 13
     const API_BASE_URL = 'https://oauth.izettle.net';
14
-    const API_AUTHORIZE_USER_LOGIN_URL = self::API_BASE_URL . '/authorize';
14
+    const API_AUTHORIZE_USER_LOGIN_URL = self::API_BASE_URL.'/authorize';
15 15
 
16
-    const API_ACCESS_TOKEN_REQUEST_URL = self::API_BASE_URL . '/token';
16
+    const API_ACCESS_TOKEN_REQUEST_URL = self::API_BASE_URL.'/token';
17 17
     const API_ACCESS_TOKEN_PASSWORD_GRANT = 'password';
18 18
     const API_ACCESS_TOKEN_CODE_GRANT = 'authorization_code';
19 19
     const API_ACCESS_ASSERTION_GRANT = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
20
-    const API_ACCESS_TOKEN_REFRESH_TOKEN_URL = self::API_BASE_URL . '/token';
20
+    const API_ACCESS_TOKEN_REFRESH_TOKEN_URL = self::API_BASE_URL.'/token';
21 21
     const API_ACCESS_TOKEN_REFRESH_TOKEN_GRANT = 'refresh_token';
22 22
 
23 23
     public function setAccessToken(AccessToken $accessToken): void;
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function getAccessTokenFromUserLogin(string $username, string $password): AccessToken;
28 28
 
29
-    public function refreshAccessToken(?AccessToken $accessToken =  null): AccessToken;
29
+    public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken;
30 30
 
31 31
     public function get(string $url, ?array $queryParameters = null): ResponseInterface;
32 32
 
Please login to merge, or discard this patch.
src/GuzzleIzettleClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $url = self::API_AUTHORIZE_USER_LOGIN_URL;
60 60
         $url .= '?response_type=code';
61
-        $url .= '&redirect_uri=' . $redirectUrl;
62
-        $url .= '&client_id=' . $this->clientId;
63
-        $url .= '&scope=' . $apiScope->getUrlParameters();
61
+        $url .= '&redirect_uri='.$redirectUrl;
62
+        $url .= '&client_id='.$this->clientId;
63
+        $url .= '&scope='.$apiScope->getUrlParameters();
64 64
         $url .= '&state=oauth2';
65 65
 
66 66
         return $url;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         return $this->accessToken;
129 129
     }
130 130
 
131
-    public function refreshAccessToken(?AccessToken $accessToken =  null): AccessToken
131
+    public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken
132 132
     {
133 133
         $accessToken = $accessToken ?? $this->accessToken;
134 134
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
     public function get(string $url, ?array $queryParameters = null): ResponseInterface
155 155
     {
156
-        $options =  array_merge(['headers' => $this->getAuthorizationHeader()], ['query' => $queryParameters]);
156
+        $options = array_merge(['headers' => $this->getAuthorizationHeader()], ['query' => $queryParameters]);
157 157
 
158 158
         try {
159 159
             $response = $this->guzzleClient->get($url, $options);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             ]
178 178
         );
179 179
 
180
-        $options =  array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]);
180
+        $options = array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]);
181 181
         try {
182 182
             return $this->guzzleClient->post($url, $options);
183 183
         } catch (ClientException $exception) {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             ]
199 199
         );
200 200
 
201
-        $options =  array_merge(['headers' => $headers], ['body' => $jsonData]);
201
+        $options = array_merge(['headers' => $headers], ['body' => $jsonData]);
202 202
 
203 203
         try {
204 204
             $this->guzzleClient->put($url, $options);
Please login to merge, or discard this patch.