mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
chore: improves type checking
This commit is contained in:
@ -39,13 +39,14 @@ final class Panic
|
||||
*/
|
||||
private function handle(): void
|
||||
{
|
||||
/** @var OutputInterface $output */
|
||||
try {
|
||||
$output = Container::getInstance()->get(OutputInterface::class);
|
||||
} catch (Throwable) {
|
||||
} catch (Throwable) { // @phpstan-ignore-line
|
||||
$output = new ConsoleOutput();
|
||||
}
|
||||
|
||||
assert($output instanceof OutputInterface);
|
||||
|
||||
if ($this->throwable instanceof Contracts\Panicable) {
|
||||
$this->throwable->render($output);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user