EnumServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 8
cts 8
cp 1
rs 9.7998
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
1
<?php
2
3
namespace MadWeb\Enum;
4
5
use Illuminate\Support\ServiceProvider;
6
use MadWeb\Enum\Console\EnumMakeCommand;
7
8
class EnumServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13 105
    public function boot()
14
    {
15
        // Config
16 105
        $this->publishes([
17 105
            __DIR__.'/../config/enum.php' => config_path('enum.php'),
18 105
        ], 'config');
19
20
        // Command
21 105
        if ($this->app->runningInConsole()) {
22 105
            $this->commands([
23 105
                EnumMakeCommand::class,
24
            ]);
25
        }
26 105
    }
27
28
    /**
29
     * Register the application services.
30
     */
31 105
    public function register()
32
    {
33 105
        $this->mergeConfigFrom(__DIR__.'/../config/enum.php', 'enum');
34 105
    }
35
}
36