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