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

GeneratorServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 1
dl 0
loc 27
ccs 0
cts 13
cp 0
rs 10

2 Methods

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