@@ -45,7 +45,7 @@ |
||
| 45 | 45 | private function assertElementIsAdjustment($adjustment) |
| 46 | 46 | { |
| 47 | 47 | if (!$adjustment instanceof AdjustmentInterface) { |
| 48 | - throw new \InvalidArgumentException('Each adjustments array element must implement ' . AdjustmentInterface::class . '.'); |
|
| 48 | + throw new \InvalidArgumentException('Each adjustments array element must implement '.AdjustmentInterface::class.'.'); |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | public function apply(OrderInterface $order, ZoneInterface $zone) |
| 66 | 66 | { |
| 67 | 67 | foreach ($order->getItems() as $item) { |
| 68 | - $quantity = $item->getQuantity(); |
|
| 68 | + $quantity = $item->getQuantity(); |
|
| 69 | 69 | if (0 === $quantity) { |
| 70 | 70 | continue; |
| 71 | 71 | } |
@@ -33,15 +33,15 @@ |
||
| 33 | 33 | |
| 34 | 34 | function it_distributes_simple_integers() |
| 35 | 35 | { |
| 36 | - $this->distribute(0, 4)->shouldReturn(array(0, 0, 0, 0));; |
|
| 37 | - $this->distribute(1000, 4)->shouldReturn(array(250, 250, 250, 250));; |
|
| 38 | - $this->distribute(-1000, 4)->shouldReturn(array(-250, -250, -250, -250));; |
|
| 36 | + $this->distribute(0, 4)->shouldReturn(array(0, 0, 0, 0)); ; |
|
| 37 | + $this->distribute(1000, 4)->shouldReturn(array(250, 250, 250, 250)); ; |
|
| 38 | + $this->distribute(-1000, 4)->shouldReturn(array(-250, -250, -250, -250)); ; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | function it_distributes_integers_that_cannot_be_split_equally() |
| 42 | 42 | { |
| 43 | - $this->distribute(1000, 3)->shouldReturn(array(334, 333, 333));; |
|
| 44 | - $this->distribute(-1000, 3)->shouldReturn(array(-334, -333, -333));; |
|
| 43 | + $this->distribute(1000, 3)->shouldReturn(array(334, 333, 333)); ; |
|
| 44 | + $this->distribute(-1000, 3)->shouldReturn(array(-334, -333, -333)); ; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | function it_throws_exception_if_number_of_targets_is_not_integer_or_below_1() |