Test Setup Failed
Push — master ( 288fe1...72e64f )
by Laurens
01:14
created
src/API/Product/Discount.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         ?Money $amount = null,
61 61
         ?float $percentage = null,
62 62
         ?string $externalReference = null
63
-    ): self {
63
+    ) : self {
64 64
         return new self(
65 65
             Uuid::uuid1(),
66 66
             $name,
Please login to merge, or discard this patch.
src/API/Product/CategoryCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
 
26 26
     public function remove(Category $category): void
27 27
     {
28
-        unset($this->collection[(string)$category->getUuid()]);
28
+        unset($this->collection[(string) $category->getUuid()]);
29 29
     }
30 30
 
31 31
     public function get(UuidInterface $key): Category
32 32
     {
33
-        return $this->collection[(string)$key];
33
+        return $this->collection[(string) $key];
34 34
     }
35 35
 
36 36
     /** @return Category[] */
Please login to merge, or discard this patch.
src/API/Product/VariantCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
 
26 26
     public function remove(Variant $variant): void
27 27
     {
28
-        unset($this->collection[(string)$variant->getUuid()]);
28
+        unset($this->collection[(string) $variant->getUuid()]);
29 29
     }
30 30
 
31 31
     public function get(UuidInterface $key): Variant
32 32
     {
33
-        return $this->collection[(string)$key];
33
+        return $this->collection[(string) $key];
34 34
     }
35 35
 
36 36
     /** @return Variant[] */
Please login to merge, or discard this patch.
src/API/Image.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 
23 23
     public function getSmallImageUrl(): string
24 24
     {
25
-        return self::BASE_URL . 'L/' . $this->getFilename();
25
+        return self::BASE_URL.'L/'.$this->getFilename();
26 26
     }
27 27
 
28 28
     public function getLargeImageUrl(): string
29 29
     {
30
-        return self::BASE_URL . 'o/' . $this->getFilename();
30
+        return self::BASE_URL.'o/'.$this->getFilename();
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/API/Purchase/PurchaseHistory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
     public function removePurchase(Purchase $purchase): void
43 43
     {
44
-        unset($this->purchases[(string)$purchase->getUuid()]);
44
+        unset($this->purchases[(string) $purchase->getUuid()]);
45 45
     }
46 46
 
47 47
     public function getPurchases(): array
Please login to merge, or discard this patch.
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/GuzzleIzettleClient.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,13 +70,13 @@
 block discarded – undo
70 70
     public function getAccessTokenFromAuthorizedCode(string $redirectUrl, string $code): AccessToken
71 71
     {
72 72
         $options = [
73
-           'form_params' => [
74
-              'grant_type' => self::API_ACCESS_TOKEN_CODE_GRANT,
75
-              'client_id' => $this->clientId,
76
-              'client_secret' => $this->clientSecret,
77
-              'redirect_uri' => $redirectUrl,
78
-              'code' => $code,
79
-           ],
73
+            'form_params' => [
74
+                'grant_type' => self::API_ACCESS_TOKEN_CODE_GRANT,
75
+                'client_id' => $this->clientId,
76
+                'client_secret' => $this->clientSecret,
77
+                'redirect_uri' => $redirectUrl,
78
+                'code' => $code,
79
+            ],
80 80
         ];
81 81
 
82 82
         try {
Please login to merge, or discard this 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 ??= $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
 
182 182
         try {
183 183
             return $this->guzzleClient->post($url, $options);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             ]
200 200
         );
201 201
 
202
-        $options =  array_merge(['headers' => $headers], ['body' => $jsonData]);
202
+        $options = array_merge(['headers' => $headers], ['body' => $jsonData]);
203 203
 
204 204
         try {
205 205
             $this->guzzleClient->put($url, $options);
Please login to merge, or discard this patch.
src/API/Product/Variant.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         ?Money $price,
58 58
         ?Money $costPrice,
59 59
         float $vatPercentage
60
-    ): self {
60
+    ) : self {
61 61
         return new self(
62 62
             Uuid::uuid1(),
63 63
             $name,
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         ];
141 141
 
142 142
         if ($this->costPrice) {
143
-            $data['costPrice'] =[
143
+            $data['costPrice'] = [
144 144
                 'amount' => $this->costPrice->getAmount(),
145 145
                 'currencyId' => (string) $this->costPrice->getCurrency(),
146 146
             ];
Please login to merge, or discard this patch.