Completed
Push — master ( 73b08b...9131b2 )
by Laurens
02:28
created
src/GuzzleIzettleClient.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace LauLamanApps\IzettleApi;
6 6
 
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
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;
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 
79 79
         try {
80 80
             $this->setAccessToken($this->requestAccessToken(self::API_ACCESS_TOKEN_REQUEST_URL, $options));
81
-        } catch (ClientException $exception){
81
+        } catch (ClientException $exception) {
82 82
             GuzzleClientExceptionHandler::handleClientException($exception);
83 83
         }
84 84
 
85 85
         return $this->accessToken;
86 86
     }
87 87
 
88
-    public function refreshAccessToken(?AccessToken $accessToken =  null): AccessToken
88
+    public function refreshAccessToken(?AccessToken $accessToken = null) : AccessToken
89 89
     {
90 90
         $accessToken = $accessToken ?? $this->accessToken;
91 91
         $options = [
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
         return $this->accessToken;
103 103
     }
104 104
 
105
-    public function get(string $url, ?array $queryParameters = null): ResponseInterface
105
+    public function get(string $url, ? array $queryParameters = null) : ResponseInterface
106 106
     {
107
-        $options =  array_merge(['headers' => $this->getAuthorizationHeader()], ['query' => $queryParameters]);
107
+        $options = array_merge(['headers' => $this->getAuthorizationHeader()], ['query' => $queryParameters]);
108 108
 
109 109
         try {
110 110
             $response = $this->guzzleClient->get($url, $options);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             ]
126 126
         );
127 127
 
128
-        $options =  array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]);
128
+        $options = array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]);
129 129
 
130 130
         return $this->guzzleClient->post($url, $options);
131 131
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             ]
141 141
         );
142 142
 
143
-        $options =  array_merge(['headers' => $headers], ['body' => $jsonData]);
143
+        $options = array_merge(['headers' => $headers], ['body' => $jsonData]);
144 144
 
145 145
         $this->guzzleClient->put($url, $options);
146 146
     }
Please login to merge, or discard this patch.