GeneratorServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 10 3
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