Completed
Push — master ( e15c58...b150a8 )
by Changwan
07:08
created

InstallServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 10 2
1
<?php
2
namespace Wandu\Installation;
3
4
use Wandu\DI\ContainerInterface;
5
use Wandu\DI\ServiceProviderInterface;
6
use Wandu\Foundation\Contracts\KernelInterface;
7
use Wandu\Installation\Commands\InstallCommand;
8
9
class InstallServiceProvider implements ServiceProviderInterface 
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function register(ContainerInterface $app)
15
    {
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function boot(ContainerInterface $app)
22
    {
23
        if ($app->has(KernelInterface::class)) {
24
            /** @var \Wandu\Foundation\Contracts\KernelInterface $kernel */
25
            $kernel = $app->get(KernelInterface::class);
26
            $kernel['commands'] = [
27
                'install' => InstallCommand::class,
28
            ];
29
        }
30
    }
31
}
32