SelfDiagnosisServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 35
ccs 16
cts 16
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 15 2
A register() 0 10 1
1
<?php
2
3
namespace BeyondCode\SelfDiagnosis;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class SelfDiagnosisServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12 108
    public function boot()
13
    {
14 108
        $this->loadTranslationsFrom(__DIR__.'/../translations', 'self-diagnosis');
15
        
16 108
        if ($this->app->runningInConsole()) {
17
18 108
            $this->publishes([
19 108
                __DIR__.'/../translations' => resource_path('lang/vendor/self-diagnosis'),
20 108
            ], 'translations');
21
22 108
            $this->publishes([
23 108
                __DIR__.'/../config/config.php' => config_path('self-diagnosis.php'),
24 108
            ], 'config');
25
        }
26 108
    }
27
28
    /**
29
     * Register the application services.
30
     */
31 108
    public function register()
32
    {
33 108
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'self-diagnosis');
34
35 108
        $this->app->bind('command.selfdiagnosis', SelfDiagnosisCommand::class);
36
37 108
        $this->commands([
38 108
            'command.selfdiagnosis',
39
        ]);
40 108
    }
41
}
42