| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public static function create( |
||
| 19 | Container $container, |
||
| 20 | string $basePath, |
||
| 21 | string $routesPrefix = '' |
||
| 22 | ): Kernel { |
||
| 23 | $container->delegate(new ReflectionContainer()); |
||
| 24 | |||
| 25 | $container->add('base_path', $basePath); |
||
| 26 | |||
| 27 | // Load service providers |
||
| 28 | $container->addServiceProvider(new RouteServiceProvider($routesPrefix)); |
||
| 29 | $container->addServiceProvider(new FilesystemServiceProvider(new Local($basePath))); |
||
| 30 | $container->addServiceProvider(new DriverServiceProvider()); |
||
| 31 | $container->addServiceProvider(new ChannelServiceProvider()); |
||
| 32 | $container->addServiceProvider(new IntentServiceProvider()); |
||
| 33 | $container->addServiceProvider(new ContextServiceProvider()); |
||
| 34 | |||
| 35 | $kernel = new Kernel($container); |
||
| 36 | |||
| 37 | $container->add(Kernel::class, $kernel); |
||
| 38 | |||
| 39 | return $kernel; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |