From 15a140312d9b9a9f28a6108fab9ace290837aaaa Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 24 Oct 2026 00:53:23 +0200 Subject: [PATCH] Return node when node mutated in place, so change is recorded --- .../Rector/ClassMethod/CollectionDocblockGenericTypeRector.php | 2 +- .../Rector/FuncCall/ArrayMapOnCollectionToArrayRector.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/TypedCollections/Rector/ClassMethod/CollectionDocblockGenericTypeRector.php b/rules/TypedCollections/Rector/ClassMethod/CollectionDocblockGenericTypeRector.php index b738d8d4..081e8189 100644 --- a/rules/TypedCollections/Rector/ClassMethod/CollectionDocblockGenericTypeRector.php +++ b/rules/TypedCollections/Rector/ClassMethod/CollectionDocblockGenericTypeRector.php @@ -161,7 +161,7 @@ public function refactor(Node $node): ?ClassMethod $this->docBlockUpdater->updateRefactoredNodeWithPhpDocInfo($node); - return null; + return $node; } /** diff --git a/rules/TypedCollections/Rector/FuncCall/ArrayMapOnCollectionToArrayRector.php b/rules/TypedCollections/Rector/FuncCall/ArrayMapOnCollectionToArrayRector.php index dbc16b41..2d1119f9 100644 --- a/rules/TypedCollections/Rector/FuncCall/ArrayMapOnCollectionToArrayRector.php +++ b/rules/TypedCollections/Rector/FuncCall/ArrayMapOnCollectionToArrayRector.php @@ -89,7 +89,7 @@ public function refactor(Node $node): ?FuncCall } if ($this->isName($node->name, 'array_filter')) { - $this->refactorArrayFilter($node); + return $this->refactorArrayFilter($node); } return null;