GeneratorsServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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