Completed
Push — master ( 9fee42...1c2b91 )
by Laurens
02:53
created
src/Client/Purchase/Exception/PurchaseNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Client\Purchase\Exception;
6 6
 
Please login to merge, or discard this patch.
src/Client/Exception/InvalidGrant/TooManyFailedAttemptsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Client\Exception\InvalidGrant;
6 6
 
Please login to merge, or discard this patch.
src/Client/ApiScope/Rights.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Client\ApiScope;
6 6
 
Please login to merge, or discard this patch.
src/Client/ApiScope.php 1 patch
Spacing   +6 added lines, -6 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\Client;
6 6
 
@@ -68,19 +68,19 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $scope = [];
70 70
         if ($this->finance !== null) {
71
-            $scope[] = self::FINANCE . ':' . $this->finance->getValue();
71
+            $scope[] = self::FINANCE.':'.$this->finance->getValue();
72 72
         }
73 73
         if ($this->purchase !== null) {
74
-            $scope[] = self::PURCHASE . ':' . $this->purchase->getValue();
74
+            $scope[] = self::PURCHASE.':'.$this->purchase->getValue();
75 75
         }
76 76
         if ($this->product !== null) {
77
-            $scope[] = self::PRODUCT . ':' . $this->product->getValue();
77
+            $scope[] = self::PRODUCT.':'.$this->product->getValue();
78 78
         }
79 79
         if ($this->inventory !== null) {
80
-            $scope[] = self::INVENTORY . ':' . $this->inventory->getValue();
80
+            $scope[] = self::INVENTORY.':'.$this->inventory->getValue();
81 81
         }
82 82
         if ($this->image !== null) {
83
-            $scope[] = self::IMAGE . ':' . $this->image->getValue();
83
+            $scope[] = self::IMAGE.':'.$this->image->getValue();
84 84
         }
85 85
 
86 86
         return implode(' ', $scope);
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,11 +10,11 @@  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
-    const API_ACCESS_TOKEN_REFRESH_TOKEN_URL = self::API_BASE_URL . '/token';
17
+    const API_ACCESS_TOKEN_REFRESH_TOKEN_URL = self::API_BASE_URL.'/token';
18 18
     const API_ACCESS_TOKEN_REFRESH_TOKEN_GRANT = 'refresh_token';
19 19
 
20 20
     public function setAccessToken(AccessToken $accessToken): void;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function getAccessTokenFromUserLogin(string $username, string $password): AccessToken;
25 25
 
26
-    public function refreshAccessToken(?AccessToken $accessToken =  null): AccessToken;
26
+    public function refreshAccessToken(?AccessToken $accessToken = null): AccessToken;
27 27
 
28 28
     public function get(string $url, ?array $queryParameters = null): ResponseInterface;
29 29
 
Please login to merge, or discard this patch.
src/GuzzleIzettleClient.php 1 patch
Spacing   +8 added lines, -8 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;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
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 = [
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 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.
src/Client/FinanceClient.php 1 patch
Spacing   +4 added lines, -4 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\Client;
6 6
 
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 {
22 22
     const BASE_URL = 'https://finance.izettle.com/organizations/%s';
23 23
 
24
-    const GET_ACCOUNT_TRANSACTIONS = self::BASE_URL . '/accounts/%s/transactions';
25
-    const GET_ACCOUNT_BALANCE = self::BASE_URL . '/accounts/%s/balance';
24
+    const GET_ACCOUNT_TRANSACTIONS = self::BASE_URL.'/accounts/%s/transactions';
25
+    const GET_ACCOUNT_BALANCE = self::BASE_URL.'/accounts/%s/balance';
26 26
 
27
-    const GET_PAYOUT_INFO = self::BASE_URL . '/payout-info';
27
+    const GET_PAYOUT_INFO = self::BASE_URL.'/payout-info';
28 28
 
29 29
     /**
30 30
      * @var IzettleClientInterface
Please login to merge, or discard this patch.
src/IzettleClientFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
src/API/ImageCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\API;
6 6
 
Please login to merge, or discard this patch.