@@ -32,7 +32,7 @@ |
||
32 | 32 | function it_is_initializable() |
33 | 33 | { |
34 | 34 | $this->shouldHaveType('Sylius\Component\Inventory\Operator\BackordersHandler'); |
35 | - } |
|
35 | + } |
|
36 | 36 | |
37 | 37 | function it_implements_Sylius_inventory_backorders_handler_interface() |
38 | 38 | { |
@@ -143,7 +143,7 @@ |
||
143 | 143 | return $this->adjustments; |
144 | 144 | } |
145 | 145 | |
146 | - return $this->adjustments->filter(function (AdjustmentInterface $adjustment) use ($type) { |
|
146 | + return $this->adjustments->filter(function(AdjustmentInterface $adjustment) use ($type) { |
|
147 | 147 | return $type === $adjustment->getType(); |
148 | 148 | }); |
149 | 149 | } |
@@ -281,7 +281,7 @@ |
||
281 | 281 | return $this->adjustments; |
282 | 282 | } |
283 | 283 | |
284 | - return $this->adjustments->filter(function (AdjustmentInterface $adjustment) use ($type) { |
|
284 | + return $this->adjustments->filter(function(AdjustmentInterface $adjustment) use ($type) { |
|
285 | 285 | return $type === $adjustment->getType(); |
286 | 286 | }); |
287 | 287 | } |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | */ |
351 | 351 | public function getVariants() |
352 | 352 | { |
353 | - return $this->variants->filter(function (BaseVariantInterface $variant) { |
|
353 | + return $this->variants->filter(function(BaseVariantInterface $variant) { |
|
354 | 354 | return !$variant->isDeleted() && !$variant->isMaster(); |
355 | 355 | }); |
356 | 356 | } |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | */ |
361 | 361 | public function getAvailableVariants() |
362 | 362 | { |
363 | - return $this->variants->filter(function (BaseVariantInterface $variant) { |
|
363 | + return $this->variants->filter(function(BaseVariantInterface $variant) { |
|
364 | 364 | return !$variant->isDeleted() && !$variant->isMaster() && $variant->isAvailable(); |
365 | 365 | }); |
366 | 366 | } |
@@ -514,8 +514,8 @@ discard block |
||
514 | 514 | { |
515 | 515 | $this->deletedAt = $deletedAt; |
516 | 516 | |
517 | - if(null === $deletedAt) { |
|
518 | - foreach($this->variants as $variant) { |
|
517 | + if (null === $deletedAt) { |
|
518 | + foreach ($this->variants as $variant) { |
|
519 | 519 | $variant->setDeletedAt(null); |
520 | 520 | } |
521 | 521 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function isInRange() |
48 | 48 | { |
49 | - if($this->start > new \DateTime() || ($this->end !== null && $this->end < new \DateTime())){ |
|
49 | + if ($this->start > new \DateTime() || ($this->end !== null && $this->end < new \DateTime())) { |
|
50 | 50 | return false; |
51 | 51 | } |
52 | 52 | return true; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | function it_assumes_quantity_is_1_if_not_provided_in_context(PriceableInterface $priceable) |
35 | 35 | { |
36 | 36 | $configuration = array( |
37 | - array('min' => 0, 'max' => 9, 'price' => 1699), |
|
37 | + array('min' => 0, 'max' => 9, 'price' => 1699), |
|
38 | 38 | array('min' => 10, 'max' => 19, 'price' => 1499), |
39 | 39 | array('min' => 20, 'max' => 29, 'price' => 1299), |
40 | 40 | ); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | function it_returns_the_price_based_on_the_quantity(PriceableInterface $priceable) |
46 | 46 | { |
47 | 47 | $configuration = array( |
48 | - array('min' => 0, 'max' => 9, 'price' => 1699), |
|
48 | + array('min' => 0, 'max' => 9, 'price' => 1699), |
|
49 | 49 | array('min' => 10, 'max' => 19, 'price' => 1499), |
50 | 50 | array('min' => 20, 'max' => 29, 'price' => 1299), |
51 | 51 | ); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | function it_returns_the_correct_price_for_highest_quantity_range(PriceableInterface $priceable) |
58 | 58 | { |
59 | 59 | $configuration = array( |
60 | - array('min' => 0, 'max' => 9, 'price' => 1699), |
|
61 | - array('min' => 10, 'max' => 19, 'price' => 1499), |
|
62 | - array('min' => 20, 'max' => 29, 'price' => 1299), |
|
60 | + array('min' => 0, 'max' => 9, 'price' => 1699), |
|
61 | + array('min' => 10, 'max' => 19, 'price' => 1499), |
|
62 | + array('min' => 20, 'max' => 29, 'price' => 1299), |
|
63 | 63 | array('min' => 30, 'max' => null, 'price' => 1099), |
64 | 64 | ); |
65 | 65 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | $subject->getShippingVolume()->willReturn(100); |
30 | 30 | |
31 | - $this->calculate($subject, array('amount' => 500, 'division' => 2))->shouldReturn(500 * 100/2); |
|
31 | + $this->calculate($subject, array('amount' => 500, 'division' => 2))->shouldReturn(500 * 100 / 2); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | function its_calculated_value_should_be_an_integer(ShippingSubjectInterface $subject) |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | $subject->getShippingWeight()->willReturn(10); |
41 | 41 | |
42 | - $this->calculate($subject, array('fixed' => 200, 'variable' => 500, 'division' => 1))->shouldReturn(200 + 500*10); |
|
42 | + $this->calculate($subject, array('fixed' => 200, 'variable' => 500, 'division' => 1))->shouldReturn(200 + 500 * 10); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | function its_calculated_value_should_be_an_integer(ShippingSubjectInterface $subject) |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function calculate(ShippingSubjectInterface $subject, array $configuration) |
25 | 25 | { |
26 | - return (int)($configuration['amount'] * $subject->getShippingItemCount()); |
|
26 | + return (int) ($configuration['amount'] * $subject->getShippingItemCount()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |