Skip to content

Commit d72d1b8

Browse files
committed
Fixed comparison error when trying to check if the model has balance.
1 parent d1796e7 commit d72d1b8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## 1.1.0 - 2021-04-05
6+
7+
- Fixed comparison error when trying to check if the model has balance.
8+
59
## 1.0.2 - 2021-03-26
610

711
- Added new accesor to get the balance amount transformed to currency.

src/HasBalance.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public function resetBalance($newAmount = null, $parameters = [])
7373
/**
7474
* Check if there is a positive balance.
7575
*
76-
* @param int $amount
76+
* @param float $amount
7777
* @return bool
7878
*/
79-
public function hasBalance(int $amount = 1)
79+
public function hasBalance($amount = 1)
8080
{
8181
return $this->balance > 0 && $this->balance >= $amount;
8282
}

0 commit comments

Comments
 (0)