Skip to content

Commit

Permalink
Fixed comparison error when trying to check if the model has balance.
Browse files Browse the repository at this point in the history
  • Loading branch information
mreduar committed Apr 5, 2021
1 parent d1796e7 commit d72d1b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-balance` will be documented in this file

## 1.1.0 - 2021-04-05

- Fixed comparison error when trying to check if the model has balance.

## 1.0.2 - 2021-03-26

- Added new accesor to get the balance amount transformed to currency.
Expand Down
4 changes: 2 additions & 2 deletions src/HasBalance.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public function resetBalance($newAmount = null, $parameters = [])
/**
* Check if there is a positive balance.
*
* @param int $amount
* @param float $amount
* @return bool
*/
public function hasBalance(int $amount = 1)
public function hasBalance($amount = 1)
{
return $this->balance > 0 && $this->balance >= $amount;
}
Expand Down

0 comments on commit d72d1b8

Please sign in to comment.