Completed
Push — master ( e1ad5c...31a7c0 )
by Nekrasov
19s queued 10s
created

ServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 1 1
A register() 0 12 1
1
<?php
2
3
namespace Arrilot\SystemCheck;
4
5
use Arrilot\SystemCheck\Console\SystemCheckCommand;
6
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
7
8
class ServiceProvider extends BaseServiceProvider
9
{
10
    public function boot() {}
11
    /**
12
     * Register the service provider.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        $this->app->singleton(ChecksCollection::class, function ($app) {
19
            return new ChecksCollection($app);
20
        });
21
22
        $this->app->singleton('command.system.check', function ($app) {
23
            return new SystemCheckCommand($app->make(ChecksCollection::class));
24
        });
25
26
        $this->commands('command.system.check');
27
    }
28
}
29