Skip to content

Commit 957ca99

Browse files
committed
fix
1 parent 7eda1b1 commit 957ca99

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/BetterPhpDocParser/ValueObject/Type/SpacingAwareArrayTypeNode.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ private function printUnionType(BracketsAwareUnionTypeNode $bracketsAwareUnionTy
7575
break;
7676
}
7777

78+
// ensure only check on base level
79+
// avoid mix usage without [] added
80+
if (count($unionedType->genericTypes) !== 1) {
81+
$allGeneric = false;
82+
break;
83+
}
84+
7885
// ensure all generic types has the same base type
7986
$currentTypeName = $unionedType->type->name;
8087

0 commit comments

Comments
 (0)