Skip to content

Commit 719d157

Browse files
committed
[ci-review] Rector Rectify
1 parent 9e2f521 commit 719d157

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

rules/TypeDeclarationDocblocks/Rector/Class_/ClassMethodArrayDocblockParamFromLocalCallsRector.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ public function refactor(Node $node): ?Node
110110
if (! $resolvedParameterType instanceof Type) {
111111
continue;
112112
}
113-
114-
if ($resolvedParameterType instanceof MixedType || ($resolvedParameterType instanceof ArrayType && $resolvedParameterType->getItemType() instanceof MixedType && $resolvedParameterType->getKeyType() instanceof MixedType)) {
113+
if ($resolvedParameterType instanceof MixedType) {
114+
continue;
115+
}
116+
if ($resolvedParameterType instanceof ArrayType && $resolvedParameterType->getItemType() instanceof MixedType && $resolvedParameterType->getKeyType() instanceof MixedType) {
115117
continue;
116118
}
117119

@@ -143,11 +145,6 @@ private function hasParamArrayType(mixed $param): bool
143145
if ($param->type === null) {
144146
return false;
145147
}
146-
147-
if (! $this->isName($param->type, 'array')) {
148-
return false;
149-
}
150-
151-
return true;
148+
return $this->isName($param->type, 'array');
152149
}
153150
}

0 commit comments

Comments
 (0)