| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public static function create( |
||
| 18 | Container $container, |
||
| 19 | string $basePath, |
||
| 20 | string $resourcesPath |
||
| 21 | ): Kernel { |
||
| 22 | $container->delegate(new ReflectionContainer()); |
||
| 23 | |||
| 24 | $container->add('base_path', $basePath); |
||
| 25 | $container->add('resources_path', $resourcesPath); |
||
| 26 | $container->addServiceProvider(new FilesystemServiceProvider(new Local($basePath))); |
||
| 27 | |||
| 28 | $kernel = new Kernel($container); |
||
| 29 | $console = new Application('FondBot', \FondBot\Application\Kernel::VERSION); |
||
| 30 | $console->add(new MakeIntent($kernel)); |
||
| 31 | $console->add(new MakeInteraction($kernel)); |
||
| 32 | |||
| 33 | $container->add(Kernel::class, $kernel); |
||
| 34 | $container->add('console', $console); |
||
| 35 | |||
| 36 | return $kernel; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |