@@ -230,6 +230,12 @@ function (PhpDocChildNode $child): string {
230
230
$ isOptional = $ node ->isOptional ? '= ' : '' ;
231
231
return trim ("{$ type }{$ isReference }{$ isVariadic }{$ node ->parameterName }" ) . $ isOptional ;
232
232
}
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
+ }
233
239
if ($ node instanceof DoctrineAnnotation) {
234
240
return (string ) $ node ;
235
241
}
@@ -367,7 +373,7 @@ private function printType(TypeNode $node): string
367
373
}, $ node ->items );
368
374
369
375
if (! $ node ->sealed ) {
370
- $ items [] = '... ' . ($ node ->unsealedType === null ? '' : $ this ->printType ($ node ->unsealedType ));
376
+ $ items [] = '... ' . ($ node ->unsealedType === null ? '' : $ this ->print ($ node ->unsealedType ));
371
377
}
372
378
373
379
return $ node ->kind . '{ ' . implode (', ' , $ items ) . '} ' ;
@@ -384,12 +390,6 @@ private function printType(TypeNode $node): string
384
390
385
391
return $ this ->printType ($ node ->valueType );
386
392
}
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
- }
393
393
if ($ node instanceof ArrayTypeNode) {
394
394
return $ this ->printOffsetAccessType ($ node ->type ) . '[] ' ;
395
395
}
0 commit comments