Skip to content

Commit 45e746b

Browse files
Fix AddReturnArrayDocblockBasedOnArrayMapRector (#6800)
1 parent 637fd47 commit 45e746b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/TypeDeclaration/Rector/ClassMethod/AddReturnArrayDocblockBasedOnArrayMapRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ public function refactor(Node $node): null|Function_|ClassMethod
127127

128128
$hasChanged = $this->phpDocTypeChanger->changeReturnType($node, $functionLikePhpDocInfo, $arrayType);
129129
if ($hasChanged) {
130-
return null;
130+
return $node;
131131
}
132132

133-
return $node;
133+
return null;
134134
}
135135

136136
private function hasNonArrayReturnType(ClassMethod|Function_ $functionLike): bool

0 commit comments

Comments
 (0)