Passed
Push — master ( 9eac7c...67926c )
by Vladimir
03:08
created

Factory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 9

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 9

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 18 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Toolbelt;
6
7
use FondBot\Application\Kernel;
8
use League\Container\Container;
9
use Symfony\Component\Console\Application;
10
11
class Factory
12
{
13 1
    public static function create(Container $container): void
14
    {
15 1
        $kernel = $container->get(Kernel::class);
16
17
        // Boot console application
18 1
        $console = new Application('FondBot', Kernel::VERSION);
19 1
        $console->addCommands([
20 1
            new Commands\MakeIntent($kernel),
21 1
            new Commands\MakeInteraction($kernel),
22 1
            new Commands\ListDrivers($kernel),
23 1
            new Commands\InstallDriver($kernel),
24 1
            new Commands\ListChannels($kernel),
25 1
            new Commands\Log($kernel),
26 1
            new Commands\QueueWorker($kernel),
27
        ]);
28
29 1
        $container->add('console', $console);
30 1
    }
31
}
32