Skip to content

Commit 9e2f521

Browse files
committed
fixup! skip trimming of union object types in ClassMethodArrayDocblockParamFromLocalCallsRector
1 parent 0b5c91e commit 9e2f521

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rules/Privatization/TypeManipulator/TypeNormalizer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ public function generalizeConstantTypes(Type $type): Type
108108
);
109109

110110
// too long
111-
if (strlen((string) $unionedDocType) > self::MAX_PRINTED_UNION_DOC_LENGHT && $this->avoidPrintedDocblockTrimming($generalizedUnionType) === false) {
111+
if (strlen(
112+
(string) $unionedDocType
113+
) > self::MAX_PRINTED_UNION_DOC_LENGHT && $this->avoidPrintedDocblockTrimming(
114+
$generalizedUnionType
115+
) === false) {
112116
$alwaysKnownArrayType = $this->narrowToAlwaysKnownArrayType($generalizedUnionType);
113117
if ($alwaysKnownArrayType instanceof ArrayType) {
114118
return $alwaysKnownArrayType;

rules/TypeDeclarationDocblocks/Rector/Class_/ClassMethodArrayDocblockParamFromLocalCallsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private function hasParamArrayType(mixed $param): bool
144144
return false;
145145
}
146146

147-
if (!$this->isName($param->type, 'array')) {
147+
if (! $this->isName($param->type, 'array')) {
148148
return false;
149149
}
150150

0 commit comments

Comments
 (0)