Skip to content

Commit

Permalink
Added missing isOutOfStock() implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Jan 15, 2024
1 parent 16acad2 commit 79e5f86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79e5f86

Please sign in to comment.