GeneratorServiceProvider::boot()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 5
c 1
b 0
f 0
nc 4
nop 0
dl 0
loc 10
rs 10
1
<?php
2
3
namespace PrismX\Generators;
4
5
use PrismX\Generators\Commands\Build;
6
use Illuminate\Support\ServiceProvider;
7
8
class GeneratorServiceProvider extends ServiceProvider
9
{
10
    public function boot()
11
    {
12
        if ($this->app->runningInConsole()) {
13
            $this->commands([
14
                Build::class,
15
            ]);
16
        }
17
18
        if (! defined('STUBS_PATH')) {
19
            define('STUBS_PATH', dirname(__DIR__).'/stubs');
20
        }
21
    }
22
23
    public function register()
24
    {
25
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'generators');
26
    }
27
}
28