@@ -403,7 +403,7 @@ discard block |
||
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 | /** |
@@ -482,7 +482,7 @@ discard block |
||
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 |
||
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 | } |
@@ -570,7 +570,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | /** |
@@ -381,7 +381,7 @@ discard block |
||
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 |
||
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 | } |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | */ |
486 | 486 | public function getTotalPrice() : ?Money |
487 | 487 | { |
488 | - return $this->createMoney((int)$this->totalPrice); |
|
488 | + return $this->createMoney((int) $this->totalPrice); |
|
489 | 489 | } |
490 | 490 | |
491 | 491 | /** |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | */ |
505 | 505 | public function getSalesDiscount() : ?Money |
506 | 506 | { |
507 | - return $this->createMoney((int)$this->salesDiscount); |
|
507 | + return $this->createMoney((int) $this->salesDiscount); |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | /** |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | */ |
524 | 524 | public function getGiftCertificateAmount() : ?Money |
525 | 525 | { |
526 | - return $this->createMoney((int)$this->giftCertificateAmount); |
|
526 | + return $this->createMoney((int) $this->giftCertificateAmount); |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | /** |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | */ |
543 | 543 | public function getShippingMethodFee() : ?Money |
544 | 544 | { |
545 | - return $this->createMoney((int)$this->shippingMethodFee); |
|
545 | + return $this->createMoney((int) $this->shippingMethodFee); |
|
546 | 546 | } |
547 | 547 | |
548 | 548 | /** |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | */ |
562 | 562 | public function getPaymentMethodFee() : ?Money |
563 | 563 | { |
564 | - return $this->createMoney((int)$this->paymentMethodFee); |
|
564 | + return $this->createMoney((int) $this->paymentMethodFee); |
|
565 | 565 | } |
566 | 566 | |
567 | 567 | /** |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | */ |
581 | 581 | public function getId(): int |
582 | 582 | { |
583 | - return (int)$this->id; |
|
583 | + return (int) $this->id; |
|
584 | 584 | } |
585 | 585 | |
586 | 586 | /** |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | */ |
599 | 599 | public function getExternalId(): int |
600 | 600 | { |
601 | - return (int)$this->externalId; |
|
601 | + return (int) $this->externalId; |
|
602 | 602 | } |
603 | 603 | |
604 | 604 | /** |
@@ -172,7 +172,7 @@ discard block |
||
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 |
@@ -185,7 +185,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -286,7 +286,7 @@ discard block |
||
286 | 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 |
||
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 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 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 |
||
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 | } |