diff --git a/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return.php.inc b/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return.php.inc index d9b6c561..b93aa7d2 100644 --- a/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return.php.inc +++ b/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return.php.inc @@ -12,7 +12,7 @@ final class SkipTryCatchReturn extends Command { try { return 0; - } catch (\Exception $e) { + } catch (\Throwable $e) { return 1; } } diff --git a/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return_with_stmts_before_return.php.inc b/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return_with_stmts_before_return.php.inc index 882a9faf..36bc4cf2 100644 --- a/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return_with_stmts_before_return.php.inc +++ b/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/skip_try_catch_return_with_stmts_before_return.php.inc @@ -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; } diff --git a/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/try_catch_return_with_stmts_before_return.php.inc b/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/try_catch_return_with_stmts_before_return.php.inc index 2249a195..411f9d29 100644 --- a/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/try_catch_return_with_stmts_before_return.php.inc +++ b/rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/try_catch_return_with_stmts_before_return.php.inc @@ -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; } @@ -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; } diff --git a/rules/Symfony44/Rector/MethodCall/WebLinkStringRelationsToConstantsRector.php b/rules/Symfony44/Rector/MethodCall/WebLinkStringRelationsToConstantsRector.php index f6798bdf..988ab7b2 100644 --- a/rules/Symfony44/Rector/MethodCall/WebLinkStringRelationsToConstantsRector.php +++ b/rules/Symfony44/Rector/MethodCall/WebLinkStringRelationsToConstantsRector.php @@ -94,7 +94,7 @@ public function refactor(Node $node): ?Node } $constFetch = $this->createConstantFetch($valueNode->value); - if (! $constFetch) { + if (!$constFetch instanceof Node) { return null; }