Skip to content

Commit

Permalink
fix php8.4 notices
Browse files Browse the repository at this point in the history
  • Loading branch information
it-can committed Jan 4, 2025
1 parent 50b3efb commit 30fad61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/VatValidatorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ public function boot(): void
*/
Validator::extend('vat_number', static function ($attribute, $value, $parameters, $validator): void {
$rule = new VatNumber();
$rule->validate($attribute, $value, static fn (string $message = null): null => null);
$rule->validate($attribute, $value, static fn (?string $message = null): null => null);
});

/**
* Register the "vat_number_exist" validation rule.
*/
Validator::extend('vat_number_exist', static function ($attribute, $value, $parameters, $validator): void {
$rule = new VatNumberExist();
$rule->validate($attribute, $value, static fn (string $message = null): null => null);
$rule->validate($attribute, $value, static fn (?string $message = null): null => null);
});

/**
* Register the "vat_number_format" validation rule.
*/
Validator::extend('vat_number_format', static function ($attribute, $value, $parameters, $validator): void {
$rule = new VatNumberFormat();
$rule->validate($attribute, $value, static fn (string $message = null): null => null);
$rule->validate($attribute, $value, static fn (?string $message = null): null => null);
});

$this->loadTranslationsFrom(realpath(__DIR__ . '/..').'/resources/lang', 'laravelVatEuValidator');
Expand Down

0 comments on commit 30fad61

Please sign in to comment.