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
396396 */
397397 protected function printCallableArgumentNode (ParameterNode $ node ): string
398398 {
399- $ type = 'mixed ' ;
399+ $ result = 'mixed ' ;
400400
401401 if ($ node ->type !== null ) {
402- $ type = $ this ->make ($ node ->type );
402+ $ result = $ this ->make ($ node ->type );
403403 }
404404
405- $ result = [$ type ];
405+ if ($ node ->attributes !== null ) {
406+ $ result = $ this ->printAttributeGroups ($ node ->attributes , false )
407+ . $ result ;
408+ }
406409
407410 if ($ node ->name !== null ) {
408- $ result[] = ' ' ;
411+ $ result . = ' ' ;
409412 }
410413
411414 if ($ node ->output ) {
412- $ result[] = '& ' ;
415+ $ result . = '& ' ;
413416 }
414417
415418 if ($ node ->variadic ) {
416- $ result[] = '... ' ;
419+ $ result . = '... ' ;
417420 }
418421
419422 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 );
422424 }
423425
424426 if ($ node ->optional ) {
425- $ result[] = '= ' ;
427+ $ result . = '= ' ;
426428 }
427429
428- return \implode ( '' , $ result) ;
430+ return $ result ;
429431 }
430432
431433 protected function shouldWrapReturnType (TypeStatement $ type ): bool
You can’t perform that action at this time.
0 commit comments