@@ -230,6 +230,12 @@ function (PhpDocChildNode $child): string {
230230 $ isOptional = $ node ->isOptional ? '= ' : '' ;
231231 return trim ("{$ type }{$ isReference }{$ isVariadic }{$ node ->parameterName }" ) . $ isOptional ;
232232 }
233+ if ($ node instanceof ArrayShapeUnsealedTypeNode) {
234+ if ($ node ->keyType !== null ) {
235+ return sprintf ('<%s, %s> ' , $ this ->printType ($ node ->keyType ), $ this ->printType ($ node ->valueType ));
236+ }
237+ return sprintf ('<%s> ' , $ this ->printType ($ node ->valueType ));
238+ }
233239 if ($ node instanceof DoctrineAnnotation) {
234240 return (string ) $ node ;
235241 }
@@ -367,7 +373,7 @@ private function printType(TypeNode $node): string
367373 }, $ node ->items );
368374
369375 if (! $ node ->sealed ) {
370- $ items [] = '... ' . ($ node ->unsealedType === null ? '' : $ this ->printType ($ node ->unsealedType ));
376+ $ items [] = '... ' . ($ node ->unsealedType === null ? '' : $ this ->print ($ node ->unsealedType ));
371377 }
372378
373379 return $ node ->kind . '{ ' . implode (', ' , $ items ) . '} ' ;
@@ -384,12 +390,6 @@ private function printType(TypeNode $node): string
384390
385391 return $ this ->printType ($ node ->valueType );
386392 }
387- if ($ node instanceof ArrayShapeUnsealedTypeNode) {
388- if ($ node ->keyType !== null ) {
389- return sprintf ('<%s, %s> ' , $ this ->printType ($ node ->keyType ), $ this ->printType ($ node ->valueType ));
390- }
391- return sprintf ('<%s> ' , $ this ->printType ($ node ->valueType ));
392- }
393393 if ($ node instanceof ArrayTypeNode) {
394394 return $ this ->printOffsetAccessType ($ node ->type ) . '[] ' ;
395395 }
0 commit comments