SetupWizardServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php namespace Lanin\Laravel\SetupWizard;
2
3
use Illuminate\Support\ServiceProvider;
4
use Lanin\Laravel\SetupWizard\Commands\Setup;
5
6
class SetupWizardServiceProvider extends ServiceProvider
7
{
8
9
    /**
10
     * Bootstrap application service.
11
     */
12 136
    public function boot()
13
    {
14 136
        $this->publishes([
15 136
            __DIR__ . '/../config/setup.php' => config_path('setup.php'),  
16 136
        ], 'setup');
17 136
    }
18
19
    /**
20
     * Register the service provider.
21
     *
22
     * @return void
23
     */
24 136
    public function register()
25
    {
26 136
        $this->registerCommand();
27 136
        $this->registerConfig();
28 136
    }
29
30
    /**
31
     * Register setup command.
32
     */
33 136
    protected function registerCommand()
34
    {
35 136
        $this->app->bind('setup-wizard.setup', Setup::class);
36
37 136
        $this->commands('setup-wizard.setup');
38 136
    }
39
40
    /**
41
     * Register setup config.
42
     */
43 136
    protected function registerConfig()
44
    {
45 136
        $this->mergeConfigFrom(
46 136
            __DIR__ . '/../config/setup.php',
47
            'setup'
48 136
        );
49 136
    }
50
51
    /**
52
     * Get the services provided by the provider.
53
     *
54
     * @return array
55
     */
56 2
    public function provides()
57
    {
58
        return [
59 2
            'setup-wizard.setup',
60 2
        ];
61
    }
62
}