SelfDiagnosisServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 10
cts 10
cp 1
rs 9.7666
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
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