IdentityServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 37
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A provides() 0 3 1
A boot() 0 6 2
1
<?php
2
3
namespace ArcherZdip\Identity;
4
5
use ArcherZdip\Identity\Console\IdentityGetCommand;
6
use ArcherZdip\Identity\Console\IdentityVerityCommand;
7
use Illuminate\Support\ServiceProvider;
8
9
class IdentityServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        if ($this->app->runningInConsole()) {
19
            $this->commands([
20
                IdentityGetCommand::class,
21
                IdentityVerityCommand::class,
22
            ]);
23
        }
24
    }
25
26
    /**
27
     * Register the application services.
28
     *
29
     * @return void
30
     */
31
    public function register()
32
    {
33
        $this->app->singleton('identity_faker', 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

33
        $this->app->singleton('identity_faker', 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...
34
            return new IdentityService();
35
        });
36
    }
37
38
    /**
39
     * Get the services provided by the provider.
40
     *
41
     * @return array
42
     */
43
    public function provides()
44
    {
45
        return ['identity_faker'];
46
    }
47
}
48