From bc91ea1976a5acc8205dedc68a22c2d980502630 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 3 Feb 2022 00:24:57 +0100 Subject: [PATCH] Update CanBeBought.php --- src/CanBeBought.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/CanBeBought.php b/src/CanBeBought.php index f11e71a..093f927 100644 --- a/src/CanBeBought.php +++ b/src/CanBeBought.php @@ -2,6 +2,8 @@ namespace Gloudemans\Shoppingcart; +use Money\Money; + trait CanBeBought { /** @@ -16,8 +18,6 @@ trait CanBeBought /** * Get the name, title or description of the Buyable item. - * - * @return string */ public function getBuyableDescription(): ?string { @@ -34,10 +34,8 @@ trait CanBeBought /** * Get the price of the Buyable item. - * - * @return float */ - public function getBuyablePrice() + public function getBuyablePrice(): Money { if (($price = $this->getAttribute('price'))) { return $price; @@ -46,10 +44,8 @@ trait CanBeBought /** * Get the weight of the Buyable item. - * - * @return float */ - public function getBuyableWeight() + public function getBuyableWeight(): float { if (($weight = $this->getAttribute('weight'))) { return $weight;