Skip to content

Commit

Permalink
add type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
kainiklas committed Apr 20, 2024
1 parent d40fca6 commit 533c69e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Forms/Components/MoneyInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function prepare(): void
{
$symbolPlacement = Config::get('filament-money-field.form_currency_symbol_placement', 'before');

$getCurrencySymbol = function ($component) {
$getCurrencySymbol = function (MoneyInput $component) {
$formattingRules = MoneyFormatter::getFormattingRules($component->getLocale());
return $formattingRules->currencySymbol;
};
Expand All @@ -62,7 +62,7 @@ protected function prepare(): void
}

if (config('filament-money-field.use_input_mask')) {
$this->mask(function ($component) {
$this->mask(function (MoneyInput $component) {
$formattingRules = MoneyFormatter::getFormattingRules($component->getLocale());
return RawJs::make('$money($input, \'' . $formattingRules->decimalSeparator . '\', \'' . $formattingRules->groupingSeparator . '\', ' . $formattingRules->fractionDigits . ')');
});
Expand Down

0 comments on commit 533c69e

Please sign in to comment.