Skip to content

Commit

Permalink
refactor: fix PHP styling
Browse files Browse the repository at this point in the history
  • Loading branch information
itinerare committed Feb 18, 2024
1 parent b1555df commit 824bd29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Services/ShopManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public function buyStock($data, $user) {
throw new \Exception('You have already purchased the maximum amount of this item you can buy.');
}

if($shopStock->purchase_limit && $quantity > $shopStock->purchase_limit) throw new \Exception("The quantity specified exceeds the amount of this item you can buy.");
if ($shopStock->purchase_limit && $quantity > $shopStock->purchase_limit) {
throw new \Exception('The quantity specified exceeds the amount of this item you can buy.');
}

$total_cost = $shopStock->cost * $quantity;

Expand Down

0 comments on commit 824bd29

Please sign in to comment.