@@ -57,7 +57,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | public function __toString() |
| 64 | 64 | { |
| 65 | - return (string)$this->name; |
|
| 65 | + return (string) $this->name; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function getId(): int |
| 72 | 72 | { |
| 73 | - return (int)$this->id; |
|
| 73 | + return (int) $this->id; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function getExternalId(): int |
| 90 | 90 | { |
| 91 | - return (int)$this->externalId; |
|
| 91 | + return (int) $this->externalId; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -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 | /** |
@@ -417,7 +417,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -566,11 +566,11 @@ discard block |
||
| 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 |
||
| 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 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | public function __toString() |
| 64 | 64 | { |
| 65 | - return (string)$this->name; |
|
| 65 | + return (string) $this->name; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function getId(): int |
| 72 | 72 | { |
| 73 | - return (int)$this->id; |
|
| 73 | + return (int) $this->id; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function getExternalId(): int |
| 90 | 90 | { |
| 91 | - return (int)$this->externalId; |
|
| 91 | + return (int) $this->externalId; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |