Completed
Push — master ( ae32ac...b72ee4 )
by Laurens
03:26
created
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 = null,
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.
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/Product/Product.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         ?string $description = null,
34 34
         ImageCollection $imageCollection,
35 35
         VariantCollection $variants,
36
-        ?string $externalReference =  null,
36
+        ?string $externalReference = null,
37 37
         string $etag,
38 38
         DateTime $updatedAt,
39 39
         UuidInterface $updatedBy,
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         ImageCollection $imageCollection,
64 64
         VariantCollection $variants,
65 65
         ?string $externalReference = null
66
-    ): self {
66
+    ) : self {
67 67
         return new self(
68 68
             Uuid::uuid1(),
69 69
             $categories,
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/GuzzleIzettleClient.php 2 patches
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;
@@ -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.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,13 +68,13 @@
 block discarded – undo
68 68
     public function getAccessTokenFromAuthorizedCode(string $redirectUrl, string $code): AccessToken
69 69
     {
70 70
         $options = [
71
-           'form_params' => [
72
-              'grant_type' => self::API_ACCESS_TOKEN_CODE_GRANT,
73
-              'client_id' => $this->clientId,
74
-              'client_secret' => $this->clientSecret,
75
-              'redirect_uri' => $redirectUrl,
76
-              'code' => $code
77
-           ],
71
+            'form_params' => [
72
+                'grant_type' => self::API_ACCESS_TOKEN_CODE_GRANT,
73
+                'client_id' => $this->clientId,
74
+                'client_secret' => $this->clientSecret,
75
+                'redirect_uri' => $redirectUrl,
76
+                'code' => $code
77
+            ],
78 78
         ];
79 79
 
80 80
         try {
Please login to merge, or discard this patch.
src/Client/FinanceClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 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.