From 54e0254c5a2cae03b5c90ccf9dd1ef77b825a437 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 31 Jul 2026 15:28:59 +0200 Subject: [PATCH] [DeadCode] Skip static property in RemoveDefaultValueFromAssignedPropertyRector --- .../Fixture/skip_static_property.php.inc | 18 ++++++++++++++++++ ...eDefaultValueFromAssignedPropertyRector.php | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 rules-tests/DeadCode/Rector/Property/RemoveDefaultValueFromAssignedPropertyRector/Fixture/skip_static_property.php.inc diff --git a/rules-tests/DeadCode/Rector/Property/RemoveDefaultValueFromAssignedPropertyRector/Fixture/skip_static_property.php.inc b/rules-tests/DeadCode/Rector/Property/RemoveDefaultValueFromAssignedPropertyRector/Fixture/skip_static_property.php.inc new file mode 100644 index 00000000000..93d615ed4de --- /dev/null +++ b/rules-tests/DeadCode/Rector/Property/RemoveDefaultValueFromAssignedPropertyRector/Fixture/skip_static_property.php.inc @@ -0,0 +1,18 @@ +isStatic()) { + continue; + } + if (! $property->isPrivate() && ! $isFinal) { continue; }