Skip to content

Commit 8433753

Browse files
committed
fixed psalm
1 parent 444216a commit 8433753

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/Casts/CurrencyCast.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
77
use UnexpectedValueException;
88

9+
/**
10+
* @template TGet
11+
* @template TSet
12+
*/
913
class CurrencyCast implements CastsAttributes
1014
{
1115
public function get($model, string $key, $value, array $attributes): Currency

src/Casts/MoneyCast.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
88
use UnexpectedValueException;
99

10+
/**
11+
* @template TGet
12+
* @template TSet
13+
*/
1014
class MoneyCast implements CastsAttributes
1115
{
1216
public function get($model, string $key, $value, array $attributes): Money

src/Rules/CurrencyRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function validate(string $attribute, mixed $value, Closure $fail): void
1515
}
1616
}
1717

18-
protected function passes($value): bool
18+
protected function passes(mixed $value): bool
1919
{
2020
return is_string($value) && array_key_exists(strtoupper($value), Currency::getCurrencies());
2121
}

0 commit comments

Comments
 (0)