Conditions | 4 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
34 | final public function execute(Bootstrap $boot) |
||
35 | { |
||
36 | $this->boots = $boot; |
||
37 | |||
38 | yield defer(function ($e = null) use ($boot) { |
||
39 | if ($e instanceof Throwable) { |
||
40 | logger('console')->error('Application crashed', ['ec' => get_class($e), 'em' => $e->getMessage()]); |
||
41 | } |
||
42 | logger('console')->info('Application going to shutdown'); |
||
43 | $this->ready && yield $boot->app()->stopping()->perform(); |
||
44 | }); |
||
45 | |||
46 | $boot->loading(...$this->components); |
||
47 | |||
48 | $this->ready && yield $boot->app()->starting()->perform(); |
||
49 | |||
50 | logger('console')->info('Application prepared to run'); |
||
51 | |||
52 | return yield $this->firing($boot->app()); |
||
|
|||
53 | } |
||
55 |