Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
lukepolo authored and StyleCIBot committed Jan 27, 2018
1 parent 29f358b commit 2f947ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LaraCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ public function totalDiscount($format = true, $withItemDiscounts = true)
}
}

if($total < 0) {
if ($total < 0) {
$total = 0;
}

Expand Down
5 changes: 3 additions & 2 deletions tests/TotalsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,11 @@ public function testPreTaxationAndDiscountWithPercentageAt100PercentCoupon()
$this->assertEquals(0, $this->laracart->total(false));
}

public function testNonZeroCoupons() {
public function testNonZeroCoupons()
{
$this->laracart->add(1, 'Produkt mit 19%', 1, 100, [\LukePOLO\LaraCart\CartItem::ITEM_TAX => (19 / 100)])
->addCoupon(new \LukePOLO\LaraCart\Coupons\Fixed('50EUR', 119, [
'description' => '50EUR'
'description' => '50EUR',
]));

$this->assertEquals(0, $this->laracart->totalDiscount(false));
Expand Down

0 comments on commit 2f947ee

Please sign in to comment.