| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 5 | public function boot() |
|
| 16 | { |
||
| 17 | // Get system is booting, load routes |
||
| 18 | 5 | $routes = $this->loadRoutes(); |
|
| 19 | |||
| 20 | 5 | $kernel = new Kernel($this->getContainer(), new Router($routes)); |
|
| 21 | |||
| 22 | 5 | $this->container->add('request', function () { |
|
| 23 | 5 | return Request::create(); |
|
| 24 | 5 | }); |
|
| 25 | |||
| 26 | 5 | $response = $kernel->handle($this->container->make('request')); |
|
| 27 | |||
| 28 | 5 | foreach ($this->services as $service) { |
|
| 29 | 5 | if (method_exists($service, 'bootstrap')) { |
|
| 30 | 5 | $service->bootstrap(); |
|
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | 5 | return $response; |
|
| 35 | } |
||
| 37 |