EnumServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
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 28
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 14 2
A register() 0 4 1
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