@@ -413,39 +413,39 @@ private function getComment(BaseNode $node): string
413
413
{
414
414
$ comment = '' ;
415
415
if ('' !== $ info = (string ) $ node ->getInfo ()) {
416
- $ comment .= ' * ' . $ info ."\n" ;
416
+ $ comment .= $ info ."\n" ;
417
417
}
418
418
419
419
if (!$ node instanceof ArrayNode) {
420
420
foreach ((array ) ($ node ->getExample () ?? []) as $ example ) {
421
- $ comment .= ' * @example ' .$ example ."\n" ;
421
+ $ comment .= '@example ' .$ example ."\n" ;
422
422
}
423
423
424
424
if ('' !== $ default = $ node ->getDefaultValue ()) {
425
- $ comment .= ' * @default ' .(null === $ default ? 'null ' : var_export ($ default , true ))."\n" ;
425
+ $ comment .= '@default ' .(null === $ default ? 'null ' : var_export ($ default , true ))."\n" ;
426
426
}
427
427
428
428
if ($ node instanceof EnumNode) {
429
- $ comment .= sprintf (' * @param ParamConfigurator|%s $value ' , implode ('| ' , array_unique (array_map (fn ($ a ) => !$ a instanceof \UnitEnum ? var_export ($ a , true ) : '\\' .ltrim (var_export ($ a , true ), '\\' ), $ node ->getValues ()))))."\n" ;
429
+ $ comment .= sprintf ('@param ParamConfigurator|%s $value ' , implode ('| ' , array_unique (array_map (fn ($ a ) => !$ a instanceof \UnitEnum ? var_export ($ a , true ) : '\\' .ltrim (var_export ($ a , true ), '\\' ), $ node ->getValues ()))))."\n" ;
430
430
} else {
431
431
$ parameterTypes = $ this ->getParameterTypes ($ node );
432
- $ comment .= ' * @param ParamConfigurator| ' .implode ('| ' , $ parameterTypes ).' $value ' ."\n" ;
432
+ $ comment .= '@param ParamConfigurator| ' .implode ('| ' , $ parameterTypes ).' $value ' ."\n" ;
433
433
}
434
434
} else {
435
435
foreach ((array ) ($ node ->getExample () ?? []) as $ example ) {
436
- $ comment .= ' * @example ' .json_encode ($ example )."\n" ;
436
+ $ comment .= '@example ' .json_encode ($ example )."\n" ;
437
437
}
438
438
439
439
if ($ node ->hasDefaultValue () && [] != $ default = $ node ->getDefaultValue ()) {
440
- $ comment .= ' * @default ' .json_encode ($ default )."\n" ;
440
+ $ comment .= '@default ' .json_encode ($ default )."\n" ;
441
441
}
442
442
}
443
443
444
444
if ($ node ->isDeprecated ()) {
445
- $ comment .= ' * @deprecated ' .$ node ->getDeprecation ($ node ->getName (), $ node ->getParent ()->getName ())['message ' ]."\n" ;
445
+ $ comment .= '@deprecated ' .$ node ->getDeprecation ($ node ->getName (), $ node ->getParent ()->getName ())['message ' ]."\n" ;
446
446
}
447
447
448
- return $ comment ;
448
+ return $ comment ? ' * ' . str_replace ( "\n" , "\n * " , rtrim ( $ comment , "\n" )). "\n" : '' ;
449
449
}
450
450
451
451
/**
0 commit comments