From 79e5f86088e4ad447c9edeee788370b7c4462de1 Mon Sep 17 00:00:00 2001 From: Attila Fulop <1162360+fulopattila122@users.noreply.github.com> Date: Mon, 15 Jan 2024 12:27:52 +0200 Subject: [PATCH] Added missing `isOutOfStock()` implementations --- Models/Product.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Models/Product.php b/Models/Product.php index 560bab7..70b5e7e 100644 --- a/Models/Product.php +++ b/Models/Product.php @@ -104,6 +104,11 @@ public function isOnStock(): bool return $this->stock > 0; } + public function isOutOfStock(): bool + { + return !$this->isOnStock(); + } + public function onStockQuantity(): float { return (float) $this->stock;