Passed
Push — master ( 196154...99d312 )
by Joachim
16:53
created
src/Entity/ProductType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      */
270 270
     public function getId(): int
271 271
     {
272
-        return (int)$this->id;
272
+        return (int) $this->id;
273 273
     }
274 274
 
275 275
     /**
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      */
288 288
     public function getExternalId(): int
289 289
     {
290
-        return (int)$this->externalId;
290
+        return (int) $this->externalId;
291 291
     }
292 292
 
293 293
     /**
Please login to merge, or discard this patch.
src/Entity/Segment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getId(): int
69 69
     {
70
-        return (int)$this->id;
70
+        return (int) $this->id;
71 71
     }
72 72
 
73 73
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function getExternalId(): string
87 87
     {
88
-        return (string)$this->externalId;
88
+        return (string) $this->externalId;
89 89
     }
90 90
 
91 91
     /**
Please login to merge, or discard this patch.
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/Product.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
     public function __toString()
405 405
     {
406
-        return (string)$this->number;
406
+        return (string) $this->number;
407 407
     }
408 408
 
409 409
     /**
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
             ->maxLength(191, 'The number must have a max length of 191');
418 418
         Assert::thatNullOr($this->externalId)->integer('The external id can only be null or an integer', 'externalId');
419 419
 
420
-        if(is_null($this->externalId)) {
420
+        if (is_null($this->externalId)) {
421 421
             Assert::that($this->isDeleted())->true('The external id can only be null if the product is marked as deleted', 'externalId');
422 422
         }
423 423
     }
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 
483 483
     public function hasManufacturer(ManufacturerInterface $manufacturer) : bool
484 484
     {
485
-        return $this->manufacturers->exists(function ($key, ManufacturerInterface $element) use ($manufacturer) {
485
+        return $this->manufacturers->exists(function($key, ManufacturerInterface $element) use ($manufacturer) {
486 486
             return $element->getExternalId() === $manufacturer->getExternalId();
487 487
         });
488 488
     }
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
             $variantGroup = $variantGroup->getExternalId();
508 508
         }
509 509
 
510
-        return $this->variantGroups->exists(function ($key, VariantGroupInterface $element) use ($variantGroup) {
510
+        return $this->variantGroups->exists(function($key, VariantGroupInterface $element) use ($variantGroup) {
511 511
             return $element->getExternalId() === $variantGroup;
512 512
         });
513 513
     }
@@ -566,11 +566,11 @@  discard block
 block discarded – undo
566 566
 
567 567
     public function hasChild($product) : bool
568 568
     {
569
-        if($product instanceof ProductInterface) {
569
+        if ($product instanceof ProductInterface) {
570 570
             $product = $product->getExternalId();
571 571
         }
572 572
 
573
-        return $this->children->exists(function ($key, ProductInterface $element) use ($product) {
573
+        return $this->children->exists(function($key, ProductInterface $element) use ($product) {
574 574
             return $element->getExternalId() === $product;
575 575
         });
576 576
     }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
      */
584 584
     public function getId(): int
585 585
     {
586
-        return (int)$this->id;
586
+        return (int) $this->id;
587 587
     }
588 588
 
589 589
     /**
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
      */
602 602
     public function getExternalId(): int
603 603
     {
604
-        return (int)$this->externalId;
604
+        return (int) $this->externalId;
605 605
     }
606 606
 
607 607
     /**
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
      */
998 998
     public function getNumber()
999 999
     {
1000
-        return (string)$this->number;
1000
+        return (string) $this->number;
1001 1001
     }
1002 1002
 
1003 1003
     /**
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/OrderLine.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     public function getUnitPriceInclVat() : ?Money
149 149
     {
150 150
         $unitPrice = $this->getUnitPrice();
151
-        if(!$unitPrice) {
151
+        if (!$unitPrice) {
152 152
             return null;
153 153
         }
154 154
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function getTotalPriceInclVat() : ?Money
166 166
     {
167 167
         $totalPrice = $this->getTotalPrice();
168
-        if(!$totalPrice) {
168
+        if (!$totalPrice) {
169 169
             return null;
170 170
         }
171 171
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     public function getId(): int
186 186
     {
187
-        return (int)$this->id;
187
+        return (int) $this->id;
188 188
     }
189 189
 
190 190
     /**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function getExternalId(): int
204 204
     {
205
-        return (int)$this->externalId;
205
+        return (int) $this->externalId;
206 206
     }
207 207
 
208 208
     /**
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
      */
293 293
     public function getTotalPrice()
294 294
     {
295
-        return DandomainFoundation\createMoney((string)$this->getOrder()->getCurrencyCode(), (int)$this->totalPrice);
295
+        return DandomainFoundation\createMoney((string) $this->getOrder()->getCurrencyCode(), (int) $this->totalPrice);
296 296
     }
297 297
 
298 298
     /**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     public function getUnitPrice()
313 313
     {
314
-        return DandomainFoundation\createMoney((string)$this->getOrder()->getCurrencyCode(), (int)$this->unitPrice);
314
+        return DandomainFoundation\createMoney((string) $this->getOrder()->getCurrencyCode(), (int) $this->unitPrice);
315 315
     }
316 316
 
317 317
     /**
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/Order.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     public function getTotalPriceExclVat() : ?Money
370 370
     {
371 371
         $totalPrice = $this->getTotalPrice();
372
-        if(!$totalPrice) {
372
+        if (!$totalPrice) {
373 373
             return null;
374 374
         }
375 375
 
@@ -381,17 +381,17 @@  discard block
 block discarded – undo
381 381
     public function totalPriceWithoutFees() : ?Money
382 382
     {
383 383
         $totalPrice = $this->getTotalPrice();
384
-        if(!$totalPrice) {
384
+        if (!$totalPrice) {
385 385
             return null;
386 386
         }
387 387
 
388 388
         $paymentMethodFee = $this->getPaymentMethodFee();
389
-        if($paymentMethodFee) {
389
+        if ($paymentMethodFee) {
390 390
             $totalPrice = $totalPrice->subtract($paymentMethodFee);
391 391
         }
392 392
 
393 393
         $shippingMethodFee = $this->getShippingMethodFee();
394
-        if($shippingMethodFee) {
394
+        if ($shippingMethodFee) {
395 395
             $totalPrice = $totalPrice->subtract($shippingMethodFee);
396 396
         }
397 397
 
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
             $orderLine = $orderLine->getExternalId();
422 422
         }
423 423
 
424
-        return $this->orderLines->exists(function ($key, OrderLineInterface $element) use ($orderLine) {
424
+        return $this->orderLines->exists(function($key, OrderLineInterface $element) use ($orderLine) {
425 425
             return $element->getExternalId() === $orderLine;
426 426
         });
427 427
     }
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
      */
451 451
     public function getTotalPrice() : ?Money
452 452
     {
453
-        return $this->createMoney((int)$this->totalPrice);
453
+        return $this->createMoney((int) $this->totalPrice);
454 454
     }
455 455
 
456 456
     /**
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      */
470 470
     public function getSalesDiscount() : ?Money
471 471
     {
472
-        return $this->createMoney((int)$this->salesDiscount);
472
+        return $this->createMoney((int) $this->salesDiscount);
473 473
     }
474 474
 
475 475
     /**
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      */
489 489
     public function getGiftCertificateAmount() : ?Money
490 490
     {
491
-        return $this->createMoney((int)$this->giftCertificateAmount);
491
+        return $this->createMoney((int) $this->giftCertificateAmount);
492 492
     }
493 493
 
494 494
     /**
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
      */
508 508
     public function getShippingMethodFee() : ?Money
509 509
     {
510
-        return $this->createMoney((int)$this->shippingMethodFee);
510
+        return $this->createMoney((int) $this->shippingMethodFee);
511 511
     }
512 512
 
513 513
     /**
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
      */
527 527
     public function getPaymentMethodFee() : ?Money
528 528
     {
529
-        return $this->createMoney((int)$this->paymentMethodFee);
529
+        return $this->createMoney((int) $this->paymentMethodFee);
530 530
     }
531 531
 
532 532
     /**
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      */
546 546
     public function getId(): int
547 547
     {
548
-        return (int)$this->id;
548
+        return (int) $this->id;
549 549
     }
550 550
 
551 551
     /**
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
      */
564 564
     public function getExternalId(): int
565 565
     {
566
-        return (int)$this->externalId;
566
+        return (int) $this->externalId;
567 567
     }
568 568
 
569 569
     /**
@@ -1142,6 +1142,6 @@  discard block
 block discarded – undo
1142 1142
      */
1143 1143
     private function createMoney(int $amount = 0) : ?Money
1144 1144
     {
1145
-        return DandomainFoundation\createMoney((string)$this->currencyCode, $amount);
1145
+        return DandomainFoundation\createMoney((string) $this->currencyCode, $amount);
1146 1146
     }
1147 1147
 }
Please login to merge, or discard this patch.