Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
14 | 1 | public static function create(Container $container): Kernel |
|
15 | { |
||
16 | 1 | $container->delegate(new ReflectionContainer); |
|
17 | |||
18 | // Boot kernel |
||
19 | 1 | $kernel = Kernel::createInstance($container); |
|
20 | |||
21 | // Boot console application |
||
22 | 1 | $console = new Application('FondBot', Kernel::VERSION); |
|
23 | 1 | $console->addCommands([ |
|
24 | 1 | new Commands\MakeIntent($kernel), |
|
25 | 1 | new Commands\MakeInteraction($kernel), |
|
26 | 1 | new Commands\ListDrivers($kernel), |
|
27 | 1 | new Commands\InstallDriver($kernel), |
|
28 | 1 | new Commands\ListChannels($kernel), |
|
29 | 1 | new Commands\Log($kernel), |
|
30 | 1 | new Commands\QueueWorker($kernel), |
|
31 | ]); |
||
32 | |||
33 | 1 | $container->add(Kernel::class, $kernel); |
|
34 | 1 | $container->add('console', $console); |
|
35 | |||
36 | 1 | return $kernel; |
|
37 | } |
||
38 | } |
||
39 |