File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -396,36 +396,38 @@ protected function printCallableTypeNode(CallableTypeNode $node): string
396
396
*/
397
397
protected function printCallableArgumentNode (ParameterNode $ node ): string
398
398
{
399
- $ type = 'mixed ' ;
399
+ $ result = 'mixed ' ;
400
400
401
401
if ($ node ->type !== null ) {
402
- $ type = $ this ->make ($ node ->type );
402
+ $ result = $ this ->make ($ node ->type );
403
403
}
404
404
405
- $ result = [$ type ];
405
+ if ($ node ->attributes !== null ) {
406
+ $ result = $ this ->printAttributeGroups ($ node ->attributes , false )
407
+ . $ result ;
408
+ }
406
409
407
410
if ($ node ->name !== null ) {
408
- $ result[] = ' ' ;
411
+ $ result . = ' ' ;
409
412
}
410
413
411
414
if ($ node ->output ) {
412
- $ result[] = '& ' ;
415
+ $ result . = '& ' ;
413
416
}
414
417
415
418
if ($ node ->variadic ) {
416
- $ result[] = '... ' ;
419
+ $ result . = '... ' ;
417
420
}
418
421
419
422
if ($ node ->name !== null ) {
420
- // @phpstan-ignore-next-line : VariableLiteralNode is a subtype of LiteralNode
421
- $ result [] = $ this ->printLiteralNode ($ node ->name );
423
+ $ result .= $ this ->printLiteralNode ($ node ->name );
422
424
}
423
425
424
426
if ($ node ->optional ) {
425
- $ result[] = '= ' ;
427
+ $ result . = '= ' ;
426
428
}
427
429
428
- return \implode ( '' , $ result) ;
430
+ return $ result ;
429
431
}
430
432
431
433
protected function shouldWrapReturnType (TypeStatement $ type ): bool
You can’t perform that action at this time.
0 commit comments