From 079ad82aa52df6e4a15f815df7f2d9bf2aef22af Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 17 Oct 2023 05:20:09 +0000 Subject: [PATCH] Updated Rector to commit 369f16a2640c381138bc12151109047ae5759f32 https://github.com/rectorphp/rector-src/commit/369f16a2640c381138bc12151109047ae5759f32 [Downgradephp81][DowngradePhp80] Handle No scope crash on DowngradeSetAccessibleReflectionPropertyRector + DowngradeMatchToSwitchRector (#5183) --- src/Application/VersionResolver.php | 4 ++-- src/ProcessAnalyzer/RectifiedAnalyzer.php | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 8618b0f515d..18633362ee8 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '11c66a7d12042656f37b27e3bba10f5b35582226'; + public const PACKAGE_VERSION = '369f16a2640c381138bc12151109047ae5759f32'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-10-16 20:40:31'; + public const RELEASE_DATE = '2023-10-17 12:17:16'; /** * @var int */ diff --git a/src/ProcessAnalyzer/RectifiedAnalyzer.php b/src/ProcessAnalyzer/RectifiedAnalyzer.php index dffb41c1319..1c47cab3a29 100644 --- a/src/ProcessAnalyzer/RectifiedAnalyzer.php +++ b/src/ProcessAnalyzer/RectifiedAnalyzer.php @@ -66,6 +66,9 @@ final class RectifiedAnalyzer if ($startTokenPos >= 0) { return \true; } - return !$node instanceof Stmt && $node->getAttributes() === []; + if ($node instanceof Stmt) { + return \array_keys($node->getAttributes()) === [AttributeKey::STMT_KEY]; + } + return $node->getAttributes() === []; } }