Completed
Push — master ( 2cf029...6368d5 )
by Joachim
12:58
created
src/Entity/Product.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Entity/OrderLine.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Entity/Category.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Entity/Period.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Entity/ShippingMethod.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Entity/Order.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Entity/PaymentMethod.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.