Test Setup Failed
Push — master ( 09af27...f99a5f )
by Arthur
13:43
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
/**
9
 * Class BootstrapServiceProvider
10
 * @package Foundation\Providers
11
 */
12
class BootstrapServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * @var BootstrapRegistrarService
16
     */
17
    protected $bootstrapService;
18
19
20
    public function bootRegistrarService()
21
    {
22
        $this->bootstrapService = new BootstrapRegistrarService();
23
24
        if (env('APP_ENV') !== 'production') {
25
            $this->bootstrapService->cache();
26
        }
27
    }
28
29
30
    public function register()
31
    {
32
        $this->bootRegistrarService();
33
        $this->loadModuleCommands();
34
        $this->loadModulePolicies();
35
    }
36
37
    private function loadModuleCommands()
38
    {
39
        $this->commands($this->bootstrapService->getCommands());
40
    }
41
42
    private function loadModulePolicies()
43
    {
44
        //TODO
45
    }
46
}
47