From fff98426f924e0c0f6498b7a20fc10d4f7b631e9 Mon Sep 17 00:00:00 2001 From: Milwad Date: Thu, 15 Aug 2024 19:47:10 +0330 Subject: [PATCH] change return type of `getPrice` --- src/Cartable.php | 2 +- tests/SetUp/Models/Product.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cartable.php b/src/Cartable.php index 7101371..926f22e 100644 --- a/src/Cartable.php +++ b/src/Cartable.php @@ -4,5 +4,5 @@ interface Cartable { - public function getPrice(): int; + public function getPrice(): float; } diff --git a/tests/SetUp/Models/Product.php b/tests/SetUp/Models/Product.php index ea0c527..754572e 100644 --- a/tests/SetUp/Models/Product.php +++ b/tests/SetUp/Models/Product.php @@ -17,8 +17,8 @@ class Product extends Model implements Cartable /** * Get the correct price. */ - public function getPrice(): int + public function getPrice(): float { - return $this->price; + return (float) $this->price; } }