@@ -22,11 +22,11 @@ |
||
| 22 | 22 | |
| 23 | 23 | protected function getDateTimeFromJson($val = null) : ?DateTimeImmutable |
| 24 | 24 | { |
| 25 | - if(!$val) { |
|
| 25 | + if (!$val) { |
|
| 26 | 26 | return null; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - if($val instanceof DateTimeImmutable) { |
|
| 29 | + if ($val instanceof DateTimeImmutable) { |
|
| 30 | 30 | return $val; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | |
| 370 | 370 | public function addDisabledVariant(VariantInterface $variant) : ProductInterface |
| 371 | 371 | { |
| 372 | - if(!$this->disabledVariants->contains($variant)) { |
|
| 372 | + if (!$this->disabledVariants->contains($variant)) { |
|
| 373 | 373 | $this->disabledVariants->add($variant); |
| 374 | 374 | } |
| 375 | 375 | |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | public function addMedium(MediumInterface $medium) : ProductInterface |
| 380 | 380 | { |
| 381 | - if(!$this->media->contains($medium)) { |
|
| 381 | + if (!$this->media->contains($medium)) { |
|
| 382 | 382 | $this->media->add($medium); |
| 383 | 383 | } |
| 384 | 384 | |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | public function addCategory(CategoryInterface $category) : ProductInterface |
| 389 | 389 | { |
| 390 | - if(!$this->categories->contains($category)) { |
|
| 390 | + if (!$this->categories->contains($category)) { |
|
| 391 | 391 | $this->categories->add($category); |
| 392 | 392 | } |
| 393 | 393 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | |
| 397 | 397 | public function addManufacturer(ManufacturerInterface $manufacturer) : ProductInterface |
| 398 | 398 | { |
| 399 | - if(!$this->hasManufacturer($manufacturer)) { |
|
| 399 | + if (!$this->hasManufacturer($manufacturer)) { |
|
| 400 | 400 | $this->manufacturers->add($manufacturer); |
| 401 | 401 | } |
| 402 | 402 | |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | public function addPrice(PriceInterface $price) : ProductInterface |
| 419 | 419 | { |
| 420 | - if(!$this->prices->contains($price)) { |
|
| 420 | + if (!$this->prices->contains($price)) { |
|
| 421 | 421 | $this->prices->add($price); |
| 422 | 422 | } |
| 423 | 423 | |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | public function addProductRelation(ProductRelationInterface $productRelation) : ProductInterface |
| 428 | 428 | { |
| 429 | - if(!$this->productRelations->contains($productRelation)) { |
|
| 429 | + if (!$this->productRelations->contains($productRelation)) { |
|
| 430 | 430 | $this->productRelations->add($productRelation); |
| 431 | 431 | } |
| 432 | 432 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | public function addSegment(SegmentInterface $segment) : ProductInterface |
| 437 | 437 | { |
| 438 | - if(!$this->segments->contains($segment)) { |
|
| 438 | + if (!$this->segments->contains($segment)) { |
|
| 439 | 439 | $this->segments->add($segment); |
| 440 | 440 | } |
| 441 | 441 | |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | |
| 445 | 445 | public function addVariant(VariantInterface $variant) : ProductInterface |
| 446 | 446 | { |
| 447 | - if(!$this->variants->contains($variant)) { |
|
| 447 | + if (!$this->variants->contains($variant)) { |
|
| 448 | 448 | $this->variants->add($variant); |
| 449 | 449 | } |
| 450 | 450 | |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | |
| 454 | 454 | public function addVariantGroup(VariantGroupInterface $variantGroup) : ProductInterface |
| 455 | 455 | { |
| 456 | - if(!$this->variantGroups->contains($variantGroup)) { |
|
| 456 | + if (!$this->variantGroups->contains($variantGroup)) { |
|
| 457 | 457 | $this->variantGroups->add($variantGroup); |
| 458 | 458 | } |
| 459 | 459 | |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | */ |
| 466 | 466 | public function getId(): int |
| 467 | 467 | { |
| 468 | - return (int)$this->id; |
|
| 468 | + return (int) $this->id; |
|
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | /** |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | */ |
| 484 | 484 | public function getExternalId(): int |
| 485 | 485 | { |
| 486 | - return (int)$this->externalId; |
|
| 486 | + return (int) $this->externalId; |
|
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | /** |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $paymentMethod = $this->getPaymentMethod(); |
| 409 | 409 | if (!$paymentMethod) { |
| 410 | 410 | $paymentMethod = new PaymentMethod(); |
| 411 | - $paymentMethod->populateFromApiResponse($data['paymentInfo'], (string)$data['currencyCode']); |
|
| 411 | + $paymentMethod->populateFromApiResponse($data['paymentInfo'], (string) $data['currencyCode']); |
|
| 412 | 412 | } |
| 413 | 413 | $this->setPaymentMethod($paymentMethod); |
| 414 | 414 | |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | $shippingMethod = $this->getShippingMethod(); |
| 417 | 417 | if (!$shippingMethod) { |
| 418 | 418 | $shippingMethod = new ShippingMethod(); |
| 419 | - $shippingMethod->populateFromApiResponse($data['shippingInfo'], (string)$data['currencyCode']); |
|
| 419 | + $shippingMethod->populateFromApiResponse($data['shippingInfo'], (string) $data['currencyCode']); |
|
| 420 | 420 | } |
| 421 | 421 | $this->setShippingMethod($shippingMethod); |
| 422 | 422 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | */ |
| 448 | 448 | public function addOrderLine(OrderLineInterface $orderLine) : OrderInterface |
| 449 | 449 | { |
| 450 | - if(!$this->hasOrderLine($orderLine)) { |
|
| 450 | + if (!$this->hasOrderLine($orderLine)) { |
|
| 451 | 451 | $this->orderLines->add($orderLine); |
| 452 | 452 | $orderLine->setOrder($this); |
| 453 | 453 | } |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | */ |
| 462 | 462 | public function hasOrderLine($orderLine) : bool |
| 463 | 463 | { |
| 464 | - if($orderLine instanceof OrderLineInterface) { |
|
| 464 | + if ($orderLine instanceof OrderLineInterface) { |
|
| 465 | 465 | $orderLine = $orderLine->getExternalId(); |
| 466 | 466 | } |
| 467 | 467 | |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | */ |
| 494 | 494 | public function getTotalPrice() : ?Money |
| 495 | 495 | { |
| 496 | - return $this->createMoney((int)$this->totalPrice); |
|
| 496 | + return $this->createMoney((int) $this->totalPrice); |
|
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | /** |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | */ |
| 513 | 513 | public function getSalesDiscount() : ?Money |
| 514 | 514 | { |
| 515 | - return $this->createMoney((int)$this->salesDiscount); |
|
| 515 | + return $this->createMoney((int) $this->salesDiscount); |
|
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | /** |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | */ |
| 532 | 532 | public function getGiftCertificateAmount() : ?Money |
| 533 | 533 | { |
| 534 | - return $this->createMoney((int)$this->giftCertificateAmount); |
|
| 534 | + return $this->createMoney((int) $this->giftCertificateAmount); |
|
| 535 | 535 | } |
| 536 | 536 | |
| 537 | 537 | /** |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | */ |
| 551 | 551 | public function getShippingMethodFee() : ?Money |
| 552 | 552 | { |
| 553 | - return $this->createMoney((int)$this->shippingMethodFee); |
|
| 553 | + return $this->createMoney((int) $this->shippingMethodFee); |
|
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | /** |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | */ |
| 570 | 570 | public function getPaymentMethodFee() : ?Money |
| 571 | 571 | { |
| 572 | - return $this->createMoney((int)$this->paymentMethodFee); |
|
| 572 | + return $this->createMoney((int) $this->paymentMethodFee); |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | /** |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | */ |
| 589 | 589 | public function getId(): int |
| 590 | 590 | { |
| 591 | - return (int)$this->id; |
|
| 591 | + return (int) $this->id; |
|
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 | /** |
@@ -1185,7 +1185,7 @@ discard block |
||
| 1185 | 1185 | */ |
| 1186 | 1186 | private function createMoney(int $amount = 0) : ?Money |
| 1187 | 1187 | { |
| 1188 | - return DandomainFoundation\createMoney((string)$this->currencyCode, $amount); |
|
| 1188 | + return DandomainFoundation\createMoney((string) $this->currencyCode, $amount); |
|
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | 1191 | /** |
@@ -1196,6 +1196,6 @@ discard block |
||
| 1196 | 1196 | */ |
| 1197 | 1197 | private function createMoneyFromFloat($amount = 0.0) : ?Money |
| 1198 | 1198 | { |
| 1199 | - return DandomainFoundation\createMoneyFromFloat((string)$this->currencyCode, $amount); |
|
| 1199 | + return DandomainFoundation\createMoneyFromFloat((string) $this->currencyCode, $amount); |
|
| 1200 | 1200 | } |
| 1201 | 1201 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function getId(): int |
| 121 | 121 | { |
| 122 | - return (int)$this->id; |
|
| 122 | + return (int) $this->id; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function getExternalId(): int |
| 139 | 139 | { |
| 140 | - return (int)$this->externalId; |
|
| 140 | + return (int) $this->externalId; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public function getTotalPrice() |
| 229 | 229 | { |
| 230 | - return DandomainFoundation\createMoney((string)$this->getOrder()->getCurrencyCode(), (int)$this->totalPrice); |
|
| 230 | + return DandomainFoundation\createMoney((string) $this->getOrder()->getCurrencyCode(), (int) $this->totalPrice); |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | public function getUnitPrice() |
| 248 | 248 | { |
| 249 | - return DandomainFoundation\createMoney((string)$this->getOrder()->getCurrencyCode(), (int)$this->unitPrice); |
|
| 249 | + return DandomainFoundation\createMoney((string) $this->getOrder()->getCurrencyCode(), (int) $this->unitPrice); |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this |
| 79 | 79 | ->setExternalId($data['id']) |
| 80 | - ->setFee(DandomainFoundation\createMoney((string)$currency, $data['fee'])) |
|
| 80 | + ->setFee(DandomainFoundation\createMoney((string) $currency, $data['fee'])) |
|
| 81 | 81 | ->setFeeInclVat($data['feeInclVat']) |
| 82 | 82 | ->setName($data['name']) |
| 83 | 83 | ; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getId(): int |
| 92 | 92 | { |
| 93 | - return (int)$this->id; |
|
| 93 | + return (int) $this->id; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function getExternalId(): int |
| 110 | 110 | { |
| 111 | - return (int)$this->externalId; |
|
| 111 | + return (int) $this->externalId; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this |
| 79 | 79 | ->setExternalId($data['id']) |
| 80 | - ->setFee(DandomainFoundation\createMoney((string)$currency, $data['fee'])) |
|
| 80 | + ->setFee(DandomainFoundation\createMoney((string) $currency, $data['fee'])) |
|
| 81 | 81 | ->setFeeInclVat($data['feeInclVat']) |
| 82 | 82 | ->setName($data['name']) |
| 83 | 83 | ; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getId(): int |
| 92 | 92 | { |
| 93 | - return (int)$this->id; |
|
| 93 | + return (int) $this->id; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function getExternalId(): int |
| 110 | 110 | { |
| 111 | - return (int)$this->externalId; |
|
| 111 | + return (int) $this->externalId; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | public function addParentCategory(CategoryInterface $category) : CategoryInterface |
| 181 | 181 | { |
| 182 | - if(!$this->hasParentCategory($category)) { |
|
| 182 | + if (!$this->hasParentCategory($category)) { |
|
| 183 | 183 | $this->parentCategories->add($category); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function hasParentCategory($category) : bool |
| 194 | 194 | { |
| 195 | - if($category instanceof CategoryInterface) { |
|
| 195 | + if ($category instanceof CategoryInterface) { |
|
| 196 | 196 | $category = $category->getExternalId(); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | */ |
| 217 | 217 | public function getId(): int |
| 218 | 218 | { |
| 219 | - return (int)$this->id; |
|
| 219 | + return (int) $this->id; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | public function getExternalId(): int |
| 236 | 236 | { |
| 237 | - return (int)$this->externalId; |
|
| 237 | + return (int) $this->externalId; |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | public function getNumber(): string |
| 254 | 254 | { |
| 255 | - return (string)$this->number; |
|
| 255 | + return (string) $this->number; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | /** |