Completed
Push — master ( a13462...c3f61e )
by recca
02:18
created

GeneratorServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Recca0120\Generator;
4
5
use Illuminate\Support\ServiceProvider;
6
use Recca0120\Generator\Console\ModelMakeCommand;
7
use Recca0120\Generator\Console\RequestMakeCommand;
8
use Recca0120\Generator\Console\PresenterMakeCommand;
9
use Recca0120\Generator\Console\ControllerMakeCommand;
10
use Recca0120\Generator\Console\RepositoryMakeCommand;
11
use Recca0120\Generator\Console\RepositoryContractMakeCommand;
12
13
class GeneratorServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Bootstrap any application services.
17
     */
18
    public function boot()
19
    {
20
21
    }
22
23
    /**
24
     * Register the service provider.
25
     */
26
    public function register()
27
    {
28
        if ($this->app->runningInConsole() === true) {
0 ignored issues
show
Bug introduced by
The method runningInConsole() does not seem to exist on object<Illuminate\Contra...Foundation\Application>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
            $this->commands([
30
                ControllerMakeCommand::class,
31
                ModelMakeCommand::class,
32
                RequestMakeCommand::class,
33
                PresenterMakeCommand::class,
34
                RepositoryMakeCommand::class,
35
                RepositoryContractMakeCommand::class
36
            ]);
37
        }
38
    }
39
}
40