Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class SkipTryCatchReturn extends Command
{
try {
return 0;
} catch (\Exception $e) {
} catch (\Throwable $e) {
return 1;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class SkipTryCatchReturnWithStmtsBeforeReturn extends Command
try {
$output->writeln('working');
return 0;
} catch (\Exception $exception) {
} catch (\Throwable $exception) {
$output->writeln($exception->getMessage());
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class TryCatchReturnWithStmtsBeforeReturnCommand extends Command
try {
$output->writeln('working');
return 0;
} catch (\Exception $exception) {
} catch (\Throwable $exception) {
$output->writeln($exception->getMessage());
return 1;
}
Expand All @@ -37,7 +37,7 @@ final class TryCatchReturnWithStmtsBeforeReturnCommand extends Command
try {
$output->writeln('working');
return 0;
} catch (\Exception $exception) {
} catch (\Throwable $exception) {
$output->writeln($exception->getMessage());
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function refactor(Node $node): ?Node
}

$constFetch = $this->createConstantFetch($valueNode->value);
if (! $constFetch) {
if (!$constFetch instanceof Node) {
return null;
}

Expand Down
Loading