Completed
Push — master ( 0f3ddf...b3dce4 )
by Joachim
12:16
created
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.