@@ -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 | /** |
@@ -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 | /** |
@@ -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 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getId(): int |
69 | 69 | { |
70 | - return (int)$this->id; |
|
70 | + return (int) $this->id; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function getExternalId(): string |
87 | 87 | { |
88 | - return (string)$this->externalId; |
|
88 | + return (string) $this->externalId; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
@@ -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 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | */ |
324 | 324 | public function addOrderLine(OrderLineInterface $orderLine) : OrderInterface |
325 | 325 | { |
326 | - if(!$this->hasOrderLine($orderLine)) { |
|
326 | + if (!$this->hasOrderLine($orderLine)) { |
|
327 | 327 | $this->orderLines->add($orderLine); |
328 | 328 | $orderLine->setOrder($this); |
329 | 329 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public function hasOrderLine($orderLine) : bool |
339 | 339 | { |
340 | - if($orderLine instanceof OrderLineInterface) { |
|
340 | + if ($orderLine instanceof OrderLineInterface) { |
|
341 | 341 | $orderLine = $orderLine->getExternalId(); |
342 | 342 | } |
343 | 343 | |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | public function getTotalPrice() : ?Money |
370 | 370 | { |
371 | - return $this->createMoney((int)$this->totalPrice); |
|
371 | + return $this->createMoney((int) $this->totalPrice); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | /** |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | */ |
388 | 388 | public function getSalesDiscount() : ?Money |
389 | 389 | { |
390 | - return $this->createMoney((int)$this->salesDiscount); |
|
390 | + return $this->createMoney((int) $this->salesDiscount); |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | /** |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | */ |
407 | 407 | public function getGiftCertificateAmount() : ?Money |
408 | 408 | { |
409 | - return $this->createMoney((int)$this->giftCertificateAmount); |
|
409 | + return $this->createMoney((int) $this->giftCertificateAmount); |
|
410 | 410 | } |
411 | 411 | |
412 | 412 | /** |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | */ |
426 | 426 | public function getShippingMethodFee() : ?Money |
427 | 427 | { |
428 | - return $this->createMoney((int)$this->shippingMethodFee); |
|
428 | + return $this->createMoney((int) $this->shippingMethodFee); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | */ |
445 | 445 | public function getPaymentMethodFee() : ?Money |
446 | 446 | { |
447 | - return $this->createMoney((int)$this->paymentMethodFee); |
|
447 | + return $this->createMoney((int) $this->paymentMethodFee); |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | /** |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | */ |
464 | 464 | public function getId(): int |
465 | 465 | { |
466 | - return (int)$this->id; |
|
466 | + return (int) $this->id; |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | */ |
1061 | 1061 | private function createMoney(int $amount = 0) : ?Money |
1062 | 1062 | { |
1063 | - return DandomainFoundation\createMoney((string)$this->currencyCode, $amount); |
|
1063 | + return DandomainFoundation\createMoney((string) $this->currencyCode, $amount); |
|
1064 | 1064 | } |
1065 | 1065 | |
1066 | 1066 | /** |
@@ -1071,6 +1071,6 @@ discard block |
||
1071 | 1071 | */ |
1072 | 1072 | private function createMoneyFromFloat($amount = 0.0) : ?Money |
1073 | 1073 | { |
1074 | - return DandomainFoundation\createMoneyFromFloat((string)$this->currencyCode, $amount); |
|
1074 | + return DandomainFoundation\createMoneyFromFloat((string) $this->currencyCode, $amount); |
|
1075 | 1075 | } |
1076 | 1076 | } |
@@ -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 | /** |