@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | Assert::that($this->number)->string()->maxLength(191); |
411 | 411 | Assert::thatNullOr($this->externalId)->integer(); |
412 | 412 | |
413 | - if(is_null($this->externalId)) { |
|
413 | + if (is_null($this->externalId)) { |
|
414 | 414 | Assert::that($this->isDeleted())->true('The external id can only be null if the product is marked as deleted'); |
415 | 415 | } |
416 | 416 | } |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | |
476 | 476 | public function hasManufacturer(ManufacturerInterface $manufacturer) : bool |
477 | 477 | { |
478 | - return $this->manufacturers->exists(function ($key, ManufacturerInterface $element) use ($manufacturer) { |
|
478 | + return $this->manufacturers->exists(function($key, ManufacturerInterface $element) use ($manufacturer) { |
|
479 | 479 | return $element->getExternalId() === $manufacturer->getExternalId(); |
480 | 480 | }); |
481 | 481 | } |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | $variantGroup = $variantGroup->getExternalId(); |
501 | 501 | } |
502 | 502 | |
503 | - return $this->variantGroups->exists(function ($key, VariantGroupInterface $element) use ($variantGroup) { |
|
503 | + return $this->variantGroups->exists(function($key, VariantGroupInterface $element) use ($variantGroup) { |
|
504 | 504 | return $element->getExternalId() === $variantGroup; |
505 | 505 | }); |
506 | 506 | } |
@@ -559,11 +559,11 @@ discard block |
||
559 | 559 | |
560 | 560 | public function hasChild($product) : bool |
561 | 561 | { |
562 | - if($product instanceof ProductInterface) { |
|
562 | + if ($product instanceof ProductInterface) { |
|
563 | 563 | $product = $product->getExternalId(); |
564 | 564 | } |
565 | 565 | |
566 | - return $this->children->exists(function ($key, ProductInterface $element) use ($product) { |
|
566 | + return $this->children->exists(function($key, ProductInterface $element) use ($product) { |
|
567 | 567 | return $element->getExternalId() === $product; |
568 | 568 | }); |
569 | 569 | } |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | */ |
577 | 577 | public function getId(): int |
578 | 578 | { |
579 | - return (int)$this->id; |
|
579 | + return (int) $this->id; |
|
580 | 580 | } |
581 | 581 | |
582 | 582 | /** |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | */ |
595 | 595 | public function getExternalId(): int |
596 | 596 | { |
597 | - return (int)$this->externalId; |
|
597 | + return (int) $this->externalId; |
|
598 | 598 | } |
599 | 599 | |
600 | 600 | /** |
@@ -990,7 +990,7 @@ discard block |
||
990 | 990 | */ |
991 | 991 | public function getNumber() |
992 | 992 | { |
993 | - return (string)$this->number; |
|
993 | + return (string) $this->number; |
|
994 | 994 | } |
995 | 995 | |
996 | 996 | /** |