Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public static function boot(string $arguments): int |
||
14 | { |
||
15 | $exitCode = 0; |
||
16 | |||
17 | $loop = Loop::get(); |
||
18 | MessengerFactory::child($loop, ArgvEncoder::decode($arguments))->then(static function (Messenger $messenger) use ($loop): void { |
||
19 | Process::create($loop, $messenger); |
||
20 | })->then(null, static function () use ($loop, &$exitCode): void { |
||
21 | $loop->stop(); |
||
22 | $exitCode = 1; |
||
23 | }); |
||
24 | |||
25 | $loop->run(); |
||
26 | |||
27 | return $exitCode; |
||
28 | } |
||
30 |