From 7d18f64fa4208219473e0e8474f72da01f43e4c3 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Thu, 29 Jul 2021 23:53:46 +0000 Subject: [PATCH] Apply fixes from StyleCI [ci skip] [skip ci] --- src/CartItem.php | 2 +- src/Coupons/Percentage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CartItem.php b/src/CartItem.php index 5ddfc14..e35bbd0 100644 --- a/src/CartItem.php +++ b/src/CartItem.php @@ -202,7 +202,7 @@ public function total() for ($qty = 0; $qty < $this->qty; $qty++) { $total += LaraCart::formatMoney($this->subTotalPerItem(false) + array_sum($this->taxSummary()[$qty]), null, null, false); } - + $total -= $this->getDiscount(false); if ($total < 0) { diff --git a/src/Coupons/Percentage.php b/src/Coupons/Percentage.php index 2d0dbb2..eca2b2d 100644 --- a/src/Coupons/Percentage.php +++ b/src/Coupons/Percentage.php @@ -47,7 +47,7 @@ public function __construct($code, $value, $options = []) public function discount($price) { if ($this->canApply()) { - return ($price * $this->value); + return $price * $this->value; } return 0;