@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function getId(): int |
271 | 271 | { |
272 | - return (int)$this->id; |
|
272 | + return (int) $this->id; |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function getExternalId(): int |
289 | 289 | { |
290 | - return (int)$this->externalId; |
|
290 | + return (int) $this->externalId; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @inheritdoc |
60 | 60 | */ |
61 | 61 | public function addTagValue(TagValue $tagValue) { |
62 | - if(!$this->tagValues->contains($tagValue)) { |
|
62 | + if (!$this->tagValues->contains($tagValue)) { |
|
63 | 63 | $this->tagValues->add($tagValue); |
64 | 64 | $tagValue->setTag($this); |
65 | 65 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * @inheritdoc |
71 | 71 | */ |
72 | 72 | public function clearTagValues() { |
73 | - foreach($this->tagValues as $tagValue) { |
|
73 | + foreach ($this->tagValues as $tagValue) { |
|
74 | 74 | $this->tagValues->removeElement($tagValue); |
75 | 75 | } |
76 | 76 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function getId(): int |
84 | 84 | { |
85 | - return (int)$this->id; |
|
85 | + return (int) $this->id; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function getExternalId(): int |
102 | 102 | { |
103 | - return (int)$this->externalId; |
|
103 | + return (int) $this->externalId; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function getId(): int |
271 | 271 | { |
272 | - return (int)$this->id; |
|
272 | + return (int) $this->id; |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function getExternalId(): int |
289 | 289 | { |
290 | - return (int)$this->externalId; |
|
290 | + return (int) $this->externalId; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | /** |
@@ -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 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function getId(): int |
269 | 269 | { |
270 | - return (int)$this->id; |
|
270 | + return (int) $this->id; |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function getExternalId(): int |
287 | 287 | { |
288 | - return (int)$this->externalId; |
|
288 | + return (int) $this->externalId; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | /** |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | */ |
304 | 304 | public function getNumber(): string |
305 | 305 | { |
306 | - return (string)$this->number; |
|
306 | + return (string) $this->number; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | /** |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $paymentMethod = $this->getPaymentMethod(); |
405 | 405 | if (!$paymentMethod) { |
406 | 406 | $paymentMethod = new PaymentMethod(); |
407 | - $paymentMethod->populateFromApiResponse($data['paymentInfo'], (string)$data['currencyCode']); |
|
407 | + $paymentMethod->populateFromApiResponse($data['paymentInfo'], (string) $data['currencyCode']); |
|
408 | 408 | } |
409 | 409 | $this->setPaymentMethod($paymentMethod); |
410 | 410 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | $shippingMethod = $this->getShippingMethod(); |
413 | 413 | if (!$shippingMethod) { |
414 | 414 | $shippingMethod = new ShippingMethod(); |
415 | - $shippingMethod->populateFromApiResponse($data['shippingInfo'], (string)$data['currencyCode']); |
|
415 | + $shippingMethod->populateFromApiResponse($data['shippingInfo'], (string) $data['currencyCode']); |
|
416 | 416 | } |
417 | 417 | $this->setShippingMethod($shippingMethod); |
418 | 418 | |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | */ |
444 | 444 | public function addOrderLine(OrderLineInterface $orderLine) : OrderInterface |
445 | 445 | { |
446 | - if(!$this->hasOrderLine($orderLine)) { |
|
446 | + if (!$this->hasOrderLine($orderLine)) { |
|
447 | 447 | $this->orderLines->add($orderLine); |
448 | 448 | $orderLine->setOrder($this); |
449 | 449 | } |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | */ |
473 | 473 | public function getTotalPrice() : ?Money |
474 | 474 | { |
475 | - return $this->createMoney((int)$this->totalPrice); |
|
475 | + return $this->createMoney((int) $this->totalPrice); |
|
476 | 476 | } |
477 | 477 | |
478 | 478 | /** |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | */ |
492 | 492 | public function getSalesDiscount() : ?Money |
493 | 493 | { |
494 | - return $this->createMoney((int)$this->salesDiscount); |
|
494 | + return $this->createMoney((int) $this->salesDiscount); |
|
495 | 495 | } |
496 | 496 | |
497 | 497 | /** |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | */ |
511 | 511 | public function getGiftCertificateAmount() : ?Money |
512 | 512 | { |
513 | - return $this->createMoney((int)$this->giftCertificateAmount); |
|
513 | + return $this->createMoney((int) $this->giftCertificateAmount); |
|
514 | 514 | } |
515 | 515 | |
516 | 516 | /** |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | */ |
530 | 530 | public function getShippingMethodFee() : ?Money |
531 | 531 | { |
532 | - return $this->createMoney((int)$this->shippingMethodFee); |
|
532 | + return $this->createMoney((int) $this->shippingMethodFee); |
|
533 | 533 | } |
534 | 534 | |
535 | 535 | /** |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | */ |
549 | 549 | public function getPaymentMethodFee() : ?Money |
550 | 550 | { |
551 | - return $this->createMoney((int)$this->paymentMethodFee); |
|
551 | + return $this->createMoney((int) $this->paymentMethodFee); |
|
552 | 552 | } |
553 | 553 | |
554 | 554 | /** |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | */ |
568 | 568 | public function getId(): int |
569 | 569 | { |
570 | - return (int)$this->id; |
|
570 | + return (int) $this->id; |
|
571 | 571 | } |
572 | 572 | |
573 | 573 | /** |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | */ |
1165 | 1165 | private function createMoney(int $amount = 0) : ?Money |
1166 | 1166 | { |
1167 | - return DandomainFoundation\createMoney((string)$this->currencyCode, $amount); |
|
1167 | + return DandomainFoundation\createMoney((string) $this->currencyCode, $amount); |
|
1168 | 1168 | } |
1169 | 1169 | |
1170 | 1170 | /** |
@@ -1175,6 +1175,6 @@ discard block |
||
1175 | 1175 | */ |
1176 | 1176 | private function createMoneyFromFloat($amount = 0.0) : ?Money |
1177 | 1177 | { |
1178 | - return DandomainFoundation\createMoneyFromFloat((string)$this->currencyCode, $amount); |
|
1178 | + return DandomainFoundation\createMoneyFromFloat((string) $this->currencyCode, $amount); |
|
1179 | 1179 | } |
1180 | 1180 | } |