From 0287344801ce8109d771c39c1cd2d25d7529937e Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 30 Sep 2025 23:30:10 +0700 Subject: [PATCH 1/2] [TypeDeclarationDocblocks] Skip bare mixed array on DocblockReturnArrayFromDirectArrayInstanceRector --- .../Fixture/skip_bare_mixed.php.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture/skip_bare_mixed.php.inc diff --git a/rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture/skip_bare_mixed.php.inc b/rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture/skip_bare_mixed.php.inc new file mode 100644 index 00000000000..f0587d93c7a --- /dev/null +++ b/rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture/skip_bare_mixed.php.inc @@ -0,0 +1,11 @@ + Date: Tue, 30 Sep 2025 16:32:54 +0000 Subject: [PATCH 2/2] [ci-review] Rector Rectify --- .../PhpDocManipulator/PhpDocTypeChanger.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php b/src/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php index 42acfaf2964..af706e71cda 100644 --- a/src/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php +++ b/src/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php @@ -115,7 +115,7 @@ public function changeReturnTypeNode( } public function changeParamTypeNode( - ClassMethod $functionLike, + ClassMethod $classMethod, PhpDocInfo $phpDocInfo, Param $param, string $paramName, @@ -129,7 +129,7 @@ public function changeParamTypeNode( $phpDocInfo->addTagValueNode($paramTagValueNode); } - $this->docBlockUpdater->updateRefactoredNodeWithPhpDocInfo($functionLike); + $this->docBlockUpdater->updateRefactoredNodeWithPhpDocInfo($classMethod); } public function changeReturnType(FunctionLike $functionLike, PhpDocInfo $phpDocInfo, Type $newType): bool