Skip to content

Commit

Permalink
Fix the itemsTotal() return type on the BaseCheckoutStore class
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Mar 30, 2024
1 parent 67558c1 commit 698d616
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Checkout/Drivers/BaseCheckoutStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
use Vanilo\Contracts\Dimension;
use Vanilo\Contracts\Shippable;

/** @todo Remove `ArrayAccess` and make the CheckoutStore interface to extend ArrayAccess in v4 */
/** @todo Remove `Shippable` and make the Checkout interface to extend Shippable in v4 */
abstract class BaseCheckoutStore implements CheckoutStore, Shippable, ArrayAccess
abstract class BaseCheckoutStore implements CheckoutStore
{
use EmulatesFillAttributes;

Expand Down Expand Up @@ -90,7 +88,7 @@ public function total()
return $this->getCart()?->total();
}

public function itemsTotal()
public function itemsTotal(): float
{
return $this->getCart()?->getItems()->sum('total');
}
Expand Down

0 comments on commit 698d616

Please sign in to comment.