AppServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 4 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\PhoneNumberValidator;
6
use App\LibPhoneNumberValidator;
7
use Illuminate\Support\ServiceProvider;
8
9
class AppServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap any application services.
13
     *
14
     * @return void
15
     */
16 21
    public function boot()
17
    {
18
        //
19 21
    }
20
21
    /**
22
     * Register any application services.
23
     *
24
     * @return void
25
     */
26
    public function register()
27
    {
28 21
        $this->app->bind(PhoneNumberValidator::class, function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

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

28
        $this->app->bind(PhoneNumberValidator::class, function (/** @scrutinizer ignore-unused */ $app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29 5
            return LibPhoneNumberValidator::getInstance();
30 21
        });
31
    }
32
}
33