bootForConsole()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace mtolhuijs\LDS;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class DatabaseSynchronizerServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Perform post-registration booting of services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        if ($this->app->runningInConsole()) {
17
            $this->bootForConsole();
18
        }
19
20
        $this->publishes([
21
            __DIR__.'/../config/database-synchronizer.php' => config_path('database-synchronizer.php'),
22
        ]);
23
    }
24
25
    /**
26
     * Register any package services.
27
     *
28
     * @return void
29
     */
30
    public function register()
31
    {
32
        $this->mergeConfigFrom(__DIR__.'/../config/database-synchronizer.php', 'database-synchronizer');
33
    }
34
35
    /**
36
     * Console-specific booting.
37
     *
38
     * @return void
39
     */
40
    protected function bootForConsole()
41
    {
42
        $this->commands([
43
            Commands\Synchronise::class,
44
        ]);
45
    }
46
}
47