Test Failed
Pull Request — master (#39)
by Laurens
02:11
created
src/Client/Purchase/PaymentBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                 return $this->parseVippsPayment($payment, $currency);
54 54
         }
55 55
 
56
-        throw new PaymentTypeNotConfiguredException('Payment type \'' . $payment['type'] . '\' not configured');
56
+        throw new PaymentTypeNotConfiguredException('Payment type \''.$payment['type'].'\' not configured');
57 57
     }
58 58
 
59 59
     private function parseCardPayment($payment, Currency $currency): CardPayment
Please login to merge, or discard this patch.
src/Client/Purchase/PurchaseHistoryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function buildFromJson(string $jsonData): PurchaseHistory
20 20
     {
21
-        $data =  json_decode($jsonData, true);
21
+        $data = json_decode($jsonData, true);
22 22
 
23 23
         return new PurchaseHistory(
24 24
             $data['firstPurchaseHash'],
Please login to merge, or discard this patch.
src/Client/ApiScope.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -68,37 +68,37 @@
 block discarded – undo
68 68
     {
69 69
         $scope = [];
70 70
         if ($this->finance !== null) {
71
-            $scope[] = $this->finance->getValue() . ':' . self::FINANCE;
71
+            $scope[] = $this->finance->getValue().':'.self::FINANCE;
72 72
             if ($this->finance->getValue() == Rights::WRITE) {
73
-                $scope[] = Rights::READ . ':' . self::FINANCE;
73
+                $scope[] = Rights::READ.':'.self::FINANCE;
74 74
             }
75 75
         }
76 76
 
77 77
         if ($this->purchase !== null) {
78
-            $scope[] = $this->purchase->getValue() . ':' . self::PURCHASE;
78
+            $scope[] = $this->purchase->getValue().':'.self::PURCHASE;
79 79
             if ($this->purchase->getValue() == Rights::WRITE) {
80
-                $scope[] = Rights::READ . ':' . self::PURCHASE;
80
+                $scope[] = Rights::READ.':'.self::PURCHASE;
81 81
             }
82 82
         }
83 83
 
84 84
         if ($this->product !== null) {
85
-            $scope[] = $this->product->getValue() . ':' . self::PRODUCT;
85
+            $scope[] = $this->product->getValue().':'.self::PRODUCT;
86 86
             if ($this->product->getValue() == Rights::WRITE) {
87
-                $scope[] = Rights::READ . ':' . self::PRODUCT;
87
+                $scope[] = Rights::READ.':'.self::PRODUCT;
88 88
             }
89 89
         }
90 90
 
91 91
         if ($this->inventory !== null) {
92
-            $scope[] = $this->inventory->getValue() . ':' . self::INVENTORY;
92
+            $scope[] = $this->inventory->getValue().':'.self::INVENTORY;
93 93
             if ($this->inventory->getValue() == Rights::WRITE) {
94
-                $scope[] = Rights::READ . ':' . self::INVENTORY;
94
+                $scope[] = Rights::READ.':'.self::INVENTORY;
95 95
             }
96 96
         }
97 97
 
98 98
         if ($this->image !== null) {
99
-            $scope[] = $this->image->getValue() . ':' . self::IMAGE;
99
+            $scope[] = $this->image->getValue().':'.self::IMAGE;
100 100
             if ($this->image->getValue() == Rights::WRITE) {
101
-                $scope[] = Rights::READ . ':' . self::IMAGE;
101
+                $scope[] = Rights::READ.':'.self::IMAGE;
102 102
             }
103 103
         }
104 104
 
Please login to merge, or discard this patch.
src/IzettleClientInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
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
@@ -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;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             ]
151 151
         );
152 152
 
153
-        $options =  array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]);
153
+        $options = array_merge(['headers' => $headers], ['body' => $postable->getPostBodyData()]);
154 154
         try {
155 155
             return $this->guzzleClient->post($url, $options);
156 156
         } catch (ClientException $exception) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             ]
172 172
         );
173 173
 
174
-        $options =  array_merge(['headers' => $headers], ['body' => $jsonData]);
174
+        $options = array_merge(['headers' => $headers], ['body' => $jsonData]);
175 175
 
176 176
         try {
177 177
             $this->guzzleClient->put($url, $options);
Please login to merge, or discard this patch.
src/Client/PurchaseClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 {
18 18
     const BASE_URL = 'https://purchase.izettle.com';
19 19
 
20
-    const GET_PURCHASE = self::BASE_URL . '/purchase/v2/%s';
21
-    const GET_PURCHASES = self::BASE_URL . '/purchases/v2';
20
+    const GET_PURCHASE = self::BASE_URL.'/purchase/v2/%s';
21
+    const GET_PURCHASES = self::BASE_URL.'/purchases/v2';
22 22
 
23 23
     private $client;
24 24
     private $purchaseHistoryBuilder;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function getPurchasesUrl()
57 57
     {
58
-        return self::GET_PURCHASES . '?' . http_build_query($this->paramters);
58
+        return self::GET_PURCHASES.'?'.http_build_query($this->paramters);
59 59
     }
60 60
 
61 61
     public function getPurchaseHistory(): PurchaseHistory
Please login to merge, or discard this patch.