Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | protected function failure(Throwable $e, int $c = null) : void |
||
23 | { |
||
24 | $styled = (new SymfonyStyle(new ArgvInput(), new ConsoleOutput())); |
||
25 | |||
26 | $styled->title(get_class($e)); |
||
27 | $styled->error($e->getMessage()); |
||
28 | $styled->note(sprintf('%s:%d', $e->getFile(), $e->getLine())); |
||
29 | |||
30 | dump($e); |
||
31 | |||
32 | is_null($c) || exit($c); |
||
|
|||
33 | } |
||
35 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.