From 08f4256242aea40648176b2209b3030b3742e70f Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 5 Feb 2022 20:12:13 +0100 Subject: [PATCH] Update Cart.php --- src/Cart.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Cart.php b/src/Cart.php index fe4df59..d85c13d 100644 --- a/src/Cart.php +++ b/src/Cart.php @@ -346,7 +346,7 @@ class Cart { return $this->getContent()->reduce(function (Money $total, CartItem $cartItem) { return $total->add($cartItem->total); - }, new Money()); + }, new Money(0, 'USD')); } /** @@ -356,7 +356,7 @@ class Cart { return $this->getContent()->reduce(function (Money $tax, CartItem $cartItem) { return $tax->add($cartItem->taxTotal); - }, new Money()); + }, new Money(0, 'USD')); } /** @@ -366,7 +366,7 @@ class Cart { return $this->getContent()->reduce(function (Money $subTotal, CartItem $cartItem) { return $subTotal->add($cartItem->subtotal); - }, new Money()); + }, new Money(0, 'USD')); } /** @@ -378,7 +378,7 @@ class Cart { return $this->getContent()->reduce(function (Money $discount, CartItem $cartItem) { return $discount->add($cartItem->discountTotal); - }, new Money()); + }, new Money(0, 'USD')); } /** @@ -388,7 +388,7 @@ class Cart { return $this->getContent()->reduce(function (Money $initial, CartItem $cartItem) { return $initial->add($cartItem->price->multiply($cartItem->qty)); - }, new Money()); + }, new Money(0, 'USD')); } /** @@ -398,7 +398,7 @@ class Cart { return $this->getContent()->reduce(function (Money $initial, CartItem $cartItem) { return $initial->add($cartItem->priceTotal); - }, new Money()); + }, new Money(0, 'USD')); } /**