Completed
Push — master ( 6f4788...09af27 )
by Arthur
14:46
created

BootstrapServiceProvider::loadModuleCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Foundation\Providers;
4
5
use Foundation\Services\BootstrapRegistrarService;
6
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
7
8
class BootstrapServiceProvider extends ServiceProvider
9
{
10
    protected $bootstrapService;
11
12
    /**
13
     * BootstrapServiceProvider constructor.
14
     */
15
    public function __construct()
16
    {
17
        parent::__construct(app());
18
        $this->bootstrapService = new BootstrapRegistrarService();
19
20
        if (env('APP_ENV') !== 'production') {
21
            $this->bootstrapService->cache();
22
        }
23
    }
24
25
26
    public function register()
27
    {
28
        $this->loadModuleCommands();
29
        $this->loadModulePolicies();
30
    }
31
32
    private function loadModuleCommands()
33
    {
34
        $this->commands($this->bootstrapService->getCommands());
35
    }
36
37
    private function loadModulePolicies()
38
    {
39
        //TODO
40
    }
41
}
42