@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | ->maxLength(191, 'The number must have a max length of 191'); |
| 413 | 413 | Assert::thatNullOr($this->externalId)->integer('The external id can only be null or an integer', 'externalId'); |
| 414 | 414 | |
| 415 | - if(is_null($this->externalId)) { |
|
| 415 | + if (is_null($this->externalId)) { |
|
| 416 | 416 | Assert::that($this->isDeleted())->true('The external id can only be null if the product is marked as deleted', 'externalId'); |
| 417 | 417 | } |
| 418 | 418 | } |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | |
| 478 | 478 | public function hasManufacturer(ManufacturerInterface $manufacturer) : bool |
| 479 | 479 | { |
| 480 | - return $this->manufacturers->exists(function ($key, ManufacturerInterface $element) use ($manufacturer) { |
|
| 480 | + return $this->manufacturers->exists(function($key, ManufacturerInterface $element) use ($manufacturer) { |
|
| 481 | 481 | return $element->getExternalId() === $manufacturer->getExternalId(); |
| 482 | 482 | }); |
| 483 | 483 | } |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | $variantGroup = $variantGroup->getExternalId(); |
| 503 | 503 | } |
| 504 | 504 | |
| 505 | - return $this->variantGroups->exists(function ($key, VariantGroupInterface $element) use ($variantGroup) { |
|
| 505 | + return $this->variantGroups->exists(function($key, VariantGroupInterface $element) use ($variantGroup) { |
|
| 506 | 506 | return $element->getExternalId() === $variantGroup; |
| 507 | 507 | }); |
| 508 | 508 | } |
@@ -561,11 +561,11 @@ discard block |
||
| 561 | 561 | |
| 562 | 562 | public function hasChild($product) : bool |
| 563 | 563 | { |
| 564 | - if($product instanceof ProductInterface) { |
|
| 564 | + if ($product instanceof ProductInterface) { |
|
| 565 | 565 | $product = $product->getExternalId(); |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | - return $this->children->exists(function ($key, ProductInterface $element) use ($product) { |
|
| 568 | + return $this->children->exists(function($key, ProductInterface $element) use ($product) { |
|
| 569 | 569 | return $element->getExternalId() === $product; |
| 570 | 570 | }); |
| 571 | 571 | } |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | */ |
| 579 | 579 | public function getId(): int |
| 580 | 580 | { |
| 581 | - return (int)$this->id; |
|
| 581 | + return (int) $this->id; |
|
| 582 | 582 | } |
| 583 | 583 | |
| 584 | 584 | /** |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | */ |
| 597 | 597 | public function getExternalId(): int |
| 598 | 598 | { |
| 599 | - return (int)$this->externalId; |
|
| 599 | + return (int) $this->externalId; |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | /** |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | */ |
| 993 | 993 | public function getNumber() |
| 994 | 994 | { |
| 995 | - return (string)$this->number; |
|
| 995 | + return (string) $this->number; |
|
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | /** |