Issues (2)

src/AppServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Soved\Laravel\Validation\PhoneNumber;
4
5
use Illuminate\Support\ServiceProvider;
6
use Illuminate\Support\Facades\Validator;
7
8
class AppServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap any application services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        Validator::extend(
18
            'phone_number',
19
            new Rules\PhoneNumber,
0 ignored issues
show
new Soved\Laravel\Valida...ber\Rules\PhoneNumber() of type Soved\Laravel\Validation...umber\Rules\PhoneNumber is incompatible with the type Closure|string expected by parameter $extension of Illuminate\Support\Facades\Validator::extend(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
            /** @scrutinizer ignore-type */ new Rules\PhoneNumber,
Loading history...
20
            'The :attribute format is invalid.'
21
        );
22
    }
23
24
    /**
25
     * Register the service provider.
26
     *
27
     * @return void
28
     */
29
    public function register()
30
    {
31
        //
32
    }
33
}
34