Completed
Push — master ( bebea9...1a6984 )
by Benjamin
08:23
created

UuidServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Bdelespierre\HasUuid\Providers;
4
5
use Bdelespierre\HasUuid\Contracts\UuidGenerator;
6
use Bdelespierre\HasUuid\Contracts\UuidValidator;
7
use Bdelespierre\HasUuid\UuidService;
8
use Illuminate\Support\ServiceProvider;
9
10
class UuidServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Bootstrap any application services.
14
     *
15
     * @return void
16
     */
17
    public function boot()
18
    {
19
        //
20
    }
21
22
    /**
23
     * Register the service provider.
24
     *
25
     */
26
    public function register()
27
    {
28
        $this->app->singleton('uuid', function ($app) {
29
            return new UuidService($app['config']);
0 ignored issues
show
Unused Code introduced by
The call to UuidService::__construct() has too many arguments starting with $app['config'].

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
30
        });
31
32
        $this->app->alias('uuid', 'uuid.generator');
33
        $this->app->alias('uuid', 'uuid.validator');
34
    }
35
}
36