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

UuidServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 26
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 9 1
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