From 42b37a76a2197ca492528babb2e2d6292de30f50 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 28 Feb 2024 15:52:40 +0000 Subject: [PATCH] Updated Rector to commit 827992ae9784abb4a2a5f5f3aecbe52606f3c737 https://github.com/rectorphp/rector-src/commit/827992ae9784abb4a2a5f5f3aecbe52606f3c737 [Performance] [DeadCode] Early check no params in __construct() on RemoveUnusedPromotedPropertyRector (#5672) --- .../Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php | 3 +++ src/Application/VersionResolver.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php index cda655aa33f..6d2a9f301b0 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php @@ -109,6 +109,9 @@ CODE_SAMPLE if (!$constructClassMethod instanceof ClassMethod) { return null; } + if ($constructClassMethod->params === []) { + return null; + } if ($this->shouldSkipClass($node)) { return null; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 0713fd60c91..0c0fa246d97 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 = 'c57c164bae7c97212384f5120857bddfee329a7d'; + public const PACKAGE_VERSION = '827992ae9784abb4a2a5f5f3aecbe52606f3c737'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-02-28 21:42:40'; + public const RELEASE_DATE = '2024-02-28 22:50:26'; /** * @var int */