Completed
Push — master ( 1b23a5...5b4efe )
by Joachim
18:35 queued 03:36
created
src/Entity/State.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function __toString()
59 59
     {
60
-        return (string)$this->name;
60
+        return (string) $this->name;
61 61
     }
62 62
 
63 63
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getId(): int
67 67
     {
68
-        return (int)$this->id;
68
+        return (int) $this->id;
69 69
     }
70 70
 
71 71
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getExternalId(): int
85 85
     {
86
-        return (int)$this->externalId;
86
+        return (int) $this->externalId;
87 87
     }
88 88
 
89 89
     /**
Please login to merge, or discard this patch.
src/Entity/Manufacturer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function __toString()
72 72
     {
73
-        return (string)$this->name;
73
+        return (string) $this->name;
74 74
     }
75 75
 
76 76
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function getId(): int
80 80
     {
81
-        return (int)$this->id;
81
+        return (int) $this->id;
82 82
     }
83 83
 
84 84
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function getExternalId(): string
98 98
     {
99
-        return (string)$this->externalId;
99
+        return (string) $this->externalId;
100 100
     }
101 101
 
102 102
     /**
Please login to merge, or discard this patch.
src/Entity/PaymentMethod.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function __toString()
59 59
     {
60
-        return (string)$this->name;
60
+        return (string) $this->name;
61 61
     }
62 62
 
63 63
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getId(): int
67 67
     {
68
-        return (int)$this->id;
68
+        return (int) $this->id;
69 69
     }
70 70
 
71 71
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getExternalId(): int
85 85
     {
86
-        return (int)$this->externalId;
86
+        return (int) $this->externalId;
87 87
     }
88 88
 
89 89
     /**
Please login to merge, or discard this patch.
src/Entity/ShippingMethod.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function __toString()
59 59
     {
60
-        return (string)$this->name;
60
+        return (string) $this->name;
61 61
     }
62 62
 
63 63
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getId(): int
67 67
     {
68
-        return (int)$this->id;
68
+        return (int) $this->id;
69 69
     }
70 70
 
71 71
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getExternalId(): int
85 85
     {
86
-        return (int)$this->externalId;
86
+        return (int) $this->externalId;
87 87
     }
88 88
 
89 89
     /**
Please login to merge, or discard this patch.
src/Entity/QueueItem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function getId(): int
97 97
     {
98
-        return (int)$this->id;
98
+        return (int) $this->id;
99 99
     }
100 100
 
101 101
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getIdentifier(): string
115 115
     {
116
-        return (string)$this->identifier;
116
+        return (string) $this->identifier;
117 117
     }
118 118
 
119 119
     /**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function getType(): string
133 133
     {
134
-        return (string)$this->type;
134
+        return (string) $this->type;
135 135
     }
136 136
 
137 137
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function getStatus(): string
151 151
     {
152
-        return (string)$this->status;
152
+        return (string) $this->status;
153 153
     }
154 154
 
155 155
     /**
Please login to merge, or discard this patch.
src/Entity/Currency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
         $this->payCode = $payCode;
374 374
         $this->setIsoCodeNumeric($payCode);
375 375
 
376
-        if($payCode) {
376
+        if ($payCode) {
377 377
             $iso4217 = new ISO4217();
378 378
             $currency = $iso4217->getByNumeric($payCode);
379 379
             $this->setIsoCodeAlpha($currency['alpha3']);
Please login to merge, or discard this patch.
src/Entity/Price.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -166,26 +166,26 @@  discard block
 block discarded – undo
166 166
     {
167 167
         $unitPrice = $this->getUnitPrice();
168 168
 
169
-        if(!$unitPrice) {
169
+        if (!$unitPrice) {
170 170
             return null;
171 171
         }
172 172
 
173 173
         $multiplier = BigDecimal::of('100')->exactlyDividedBy(BigDecimal::of('100')->plus($vat));
174 174
 
175
-        return $unitPrice->multiply((string)$multiplier);
175
+        return $unitPrice->multiply((string) $multiplier);
176 176
     }
177 177
 
178 178
     public function getSpecialOfferPriceExclVat(float $vat) : ?Money
179 179
     {
180 180
         $specialOfferPrice = $this->getSpecialOfferPrice();
181 181
 
182
-        if(!$specialOfferPrice) {
182
+        if (!$specialOfferPrice) {
183 183
             return null;
184 184
         }
185 185
 
186 186
         $multiplier = BigDecimal::of('100')->exactlyDividedBy(BigDecimal::of('100')->plus($vat));
187 187
 
188
-        return $specialOfferPrice->multiply((string)$multiplier);
188
+        return $specialOfferPrice->multiply((string) $multiplier);
189 189
     }
190 190
 
191 191
     /**
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function getId(): int
195 195
     {
196
-        return (int)$this->id;
196
+        return (int) $this->id;
197 197
     }
198 198
 
199 199
     /**
@@ -283,10 +283,10 @@  discard block
 block discarded – undo
283 283
      */
284 284
     public function getSpecialOfferPrice() : ?Money
285 285
     {
286
-        if(!$this->currency) {
286
+        if (!$this->currency) {
287 287
             return null;
288 288
         }
289
-        return DandomainFoundation\createMoney($this->currency->getIsoCodeAlpha(), (int)$this->specialOfferPrice);
289
+        return DandomainFoundation\createMoney($this->currency->getIsoCodeAlpha(), (int) $this->specialOfferPrice);
290 290
     }
291 291
 
292 292
     /**
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     public function setSpecialOfferPrice(Money $specialOfferPrice) : PriceInterface
297 297
     {
298 298
         // @todo change type from int to string
299
-        $this->specialOfferPrice = (int)$specialOfferPrice->getAmount();
299
+        $this->specialOfferPrice = (int) $specialOfferPrice->getAmount();
300 300
 
301 301
         return $this;
302 302
     }
@@ -306,10 +306,10 @@  discard block
 block discarded – undo
306 306
      */
307 307
     public function getUnitPrice() : ?Money
308 308
     {
309
-        if(!$this->currency) {
309
+        if (!$this->currency) {
310 310
             return null;
311 311
         }
312
-        return DandomainFoundation\createMoney($this->currency->getIsoCodeAlpha(), (int)$this->unitPrice);
312
+        return DandomainFoundation\createMoney($this->currency->getIsoCodeAlpha(), (int) $this->unitPrice);
313 313
     }
314 314
 
315 315
     /**
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     public function setUnitPrice(Money $unitPrice) : PriceInterface
320 320
     {
321 321
         // @todo change type from int to string
322
-        $this->unitPrice = (int)$unitPrice->getAmount();
322
+        $this->unitPrice = (int) $unitPrice->getAmount();
323 323
 
324 324
         return $this;
325 325
     }
Please login to merge, or discard this patch.
src/Entity/Order.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 
382 382
         $multiplier = BigDecimal::of('100')->exactlyDividedBy(BigDecimal::of('100')->plus($this->vatPct));
383 383
 
384
-        return $totalPrice->multiply((string)$multiplier);
384
+        return $totalPrice->multiply((string) $multiplier);
385 385
     }
386 386
 
387 387
     public function totalPriceWithoutFees() : ?Money
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
             $orderLine = $orderLine->getExternalId();
428 428
         }
429 429
 
430
-        return $this->orderLines->exists(function ($key, OrderLineInterface $element) use ($orderLine) {
430
+        return $this->orderLines->exists(function($key, OrderLineInterface $element) use ($orderLine) {
431 431
             return $element->getExternalId() === $orderLine;
432 432
         });
433 433
     }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
      */
457 457
     public function getTotalPrice() : ?Money
458 458
     {
459
-        return $this->createMoney((int)$this->totalPrice);
459
+        return $this->createMoney((int) $this->totalPrice);
460 460
     }
461 461
 
462 462
     /**
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
      */
476 476
     public function getSalesDiscount() : ?Money
477 477
     {
478
-        return $this->createMoney((int)$this->salesDiscount);
478
+        return $this->createMoney((int) $this->salesDiscount);
479 479
     }
480 480
 
481 481
     /**
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
      */
495 495
     public function getGiftCertificateAmount() : ?Money
496 496
     {
497
-        return $this->createMoney((int)$this->giftCertificateAmount);
497
+        return $this->createMoney((int) $this->giftCertificateAmount);
498 498
     }
499 499
 
500 500
     /**
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
      */
514 514
     public function getShippingMethodFee() : ?Money
515 515
     {
516
-        return $this->createMoney((int)$this->shippingMethodFee);
516
+        return $this->createMoney((int) $this->shippingMethodFee);
517 517
     }
518 518
 
519 519
     /**
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
      */
533 533
     public function getPaymentMethodFee() : ?Money
534 534
     {
535
-        return $this->createMoney((int)$this->paymentMethodFee);
535
+        return $this->createMoney((int) $this->paymentMethodFee);
536 536
     }
537 537
 
538 538
     /**
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
      */
552 552
     public function getId(): int
553 553
     {
554
-        return (int)$this->id;
554
+        return (int) $this->id;
555 555
     }
556 556
 
557 557
     /**
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
      */
570 570
     public function getExternalId(): int
571 571
     {
572
-        return (int)$this->externalId;
572
+        return (int) $this->externalId;
573 573
     }
574 574
 
575 575
     /**
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
      */
1149 1149
     private function createMoney(int $amount = 0) : ?Money
1150 1150
     {
1151
-        if(!$this->currency) {
1151
+        if (!$this->currency) {
1152 1152
             return null;
1153 1153
         }
1154 1154
 
Please login to merge, or discard this patch.
src/Entity/OrderLine.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
         $multiplier = BigDecimal::of('100')->plus($this->vatPct)->exactlyDividedBy('100');
155 155
 
156
-        return $unitPrice->multiply((string)$multiplier);
156
+        return $unitPrice->multiply((string) $multiplier);
157 157
     }
158 158
 
159 159
     public function getUnitPriceExclVat() : ?Money
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
         $multiplier = BigDecimal::of('100')->plus($this->vatPct)->exactlyDividedBy('100');
172 172
 
173
-        return $totalPrice->multiply((string)$multiplier);
173
+        return $totalPrice->multiply((string) $multiplier);
174 174
     }
175 175
 
176 176
     public function getTotalPriceExclVat() : ?Money
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      */
184 184
     public function getId(): int
185 185
     {
186
-        return (int)$this->id;
186
+        return (int) $this->id;
187 187
     }
188 188
 
189 189
     /**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function getExternalId(): int
203 203
     {
204
-        return (int)$this->externalId;
204
+        return (int) $this->externalId;
205 205
     }
206 206
 
207 207
     /**
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function getTotalPrice()
293 293
     {
294
-        return DandomainFoundation\createMoney($this->getCurrencyCode(), (int)$this->totalPrice);
294
+        return DandomainFoundation\createMoney($this->getCurrencyCode(), (int) $this->totalPrice);
295 295
     }
296 296
 
297 297
     /**
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function getUnitPrice()
312 312
     {
313
-        return DandomainFoundation\createMoney($this->getCurrencyCode(), (int)$this->unitPrice);
313
+        return DandomainFoundation\createMoney($this->getCurrencyCode(), (int) $this->unitPrice);
314 314
     }
315 315
 
316 316
     /**
Please login to merge, or discard this patch.