@@ -23,11 +23,9 @@ public function __construct(
2323 }
2424
2525 /**
26- * @param float|int|string $amount
27- *
2826 * @throws AmountInvalid
2927 */
30- public function checkPositive ($ amount ): void
28+ public function checkPositive (float | int | string $ amount ): void
3129 {
3230 if ($ this ->mathService ->compare ($ amount , 0 ) === -1 ) {
3331 throw new AmountInvalid (
@@ -38,12 +36,10 @@ public function checkPositive($amount): void
3836 }
3937
4038 /**
41- * @param float|int|string $amount
42- *
4339 * @throws BalanceIsEmpty
4440 * @throws InsufficientFunds
4541 */
46- public function checkPotential (Wallet $ object , $ amount , bool $ allowZero = false ): void
42+ public function checkPotential (Wallet $ object , float | int | string $ amount , bool $ allowZero = false ): void
4743 {
4844 $ wallet = $ this ->castService ->getWallet ($ object , false );
4945 $ balance = $ this ->mathService ->add ($ wallet ->getBalanceAttribute (), $ wallet ->getCreditAttribute ());
@@ -63,11 +59,7 @@ public function checkPotential(Wallet $object, $amount, bool $allowZero = false)
6359 }
6460 }
6561
66- /**
67- * @param float|int|string $balance
68- * @param float|int|string $amount
69- */
70- public function canWithdraw ($ balance , $ amount , bool $ allowZero = false ): bool
62+ public function canWithdraw (float |int |string $ balance , float |int |string $ amount , bool $ allowZero = false ): bool
7163 {
7264 $ mathService = app (MathServiceInterface::class);
7365
0 commit comments