CascadeDeleteServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
nc 2
nop 0
dl 0
loc 9
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Cesargb\Database\Support;
4
5
use Cesargb\Database\Support\Commands\MorphCleanCommand;
6
use Illuminate\Support\ServiceProvider;
7
8
class CascadeDeleteServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->publishes([
18
            __DIR__.'/../config/morph.php' => config_path('morph.php'),
19
        ], 'config');
20
21
        if ($this->app->runningInConsole()) {
22
            $this->commands([
23
                MorphCleanCommand::class,
24
            ]);
25
        }
26
    }
27
}
28