ForgeSyncServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
3
namespace OhDear\ForgeSync;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ForgeSyncServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        if ($this->app->runningInConsole()) {
12
            $this->publishes([
13
                __DIR__.'/../config/forge-sync.php' => config_path('forge-sync.php'),
14
            ], 'config');
15
16
            $this->commands([
17
                SyncSitesCommand::class,
18
            ]);
19
        }
20
    }
21
22
    public function register()
23
    {
24
        $this->mergeConfigFrom(__DIR__.'/../config/forge-sync.php', 'forge-sync');
25
    }
26
}
27