From 4ba1e9dca71fc29ffe454785d1ac22529b916e21 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 14 Jul 2026 15:31:37 +0700 Subject: [PATCH] [DeadCode] Skip string scalar sub type on RemoveReturnTagIncompatibleWithNativeTypeRector --- .../Fixture/skip_subtype.php.inc | 54 +++++++++++++++++++ .../Mapper/ScalarStringToTypeMapper.php | 37 +++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 rules-tests/DeadCode/Rector/ClassMethod/RemoveReturnTagIncompatibleWithNativeTypeRector/Fixture/skip_subtype.php.inc diff --git a/rules-tests/DeadCode/Rector/ClassMethod/RemoveReturnTagIncompatibleWithNativeTypeRector/Fixture/skip_subtype.php.inc b/rules-tests/DeadCode/Rector/ClassMethod/RemoveReturnTagIncompatibleWithNativeTypeRector/Fixture/skip_subtype.php.inc new file mode 100644 index 00000000000..5c7e97e9299 --- /dev/null +++ b/rules-tests/DeadCode/Rector/ClassMethod/RemoveReturnTagIncompatibleWithNativeTypeRector/Fixture/skip_subtype.php.inc @@ -0,0 +1,54 @@ + $scalarNames) { if (! in_array($loweredScalarName, $scalarNames, true)) { continue;