Skip to content

Commit f2551d0

Browse files
committed
re use NodeDocblockTypeDecorator
1 parent 43bc165 commit f2551d0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

rules/TypeDeclarationDocblocks/Rector/ClassMethod/AddParamArrayDocblockFromAssignsParamToParamReferenceRector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,18 @@ public function refactor(Node $node): ?Node
118118

119119
$assignedExprType = $this->getType($exprs[0]);
120120
$iterableType = new ArrayType(new MixedType(), $assignedExprType);
121-
$this->nodeDocblockTypeDecorator->decorateGenericIterableParamType(
121+
$hasParamTypeChanged = $this->nodeDocblockTypeDecorator->decorateGenericIterableParamType(
122122
$iterableType,
123123
$phpDocInfo,
124124
$node,
125125
$param,
126126
$paramName
127127
);
128128

129+
if (! $hasParamTypeChanged) {
130+
continue;
131+
}
132+
129133
$hasChanged = true;
130134
}
131135

0 commit comments

Comments
 (0)