ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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