@@ -38,13 +38,13 @@ protected function describeInputArgument(InputArgument $argument, array $options
38
38
}
39
39
40
40
$ totalWidth = isset ($ options ['total_width ' ]) ? $ options ['total_width ' ] : strlen ($ argument ->getName ());
41
- $ spacingWidth = $ totalWidth - strlen ($ argument ->getName ()) + 2 ;
41
+ $ spacingWidth = $ totalWidth - strlen ($ argument ->getName ());
42
42
43
- $ this ->writeText (sprintf (' <info>%s</info>%s%s%s ' ,
43
+ $ this ->writeText (sprintf (' <info>%s</info> %s%s%s ' ,
44
44
$ argument ->getName (),
45
45
str_repeat (' ' , $ spacingWidth ),
46
- // + 17 = 2 spaces + <info> + </info> + 2 spaces
47
- preg_replace ('/\s*[\r\n]\s*/ ' , "\n" .str_repeat (' ' , $ totalWidth + 17 ), $ argument ->getDescription ()),
46
+ // + 4 = 2 spaces before <info>, 2 spaces after </info>
47
+ preg_replace ('/\s*[\r\n]\s*/ ' , "\n" .str_repeat (' ' , $ totalWidth + 4 ), $ argument ->getDescription ()),
48
48
$ default
49
49
), $ options );
50
50
}
@@ -75,13 +75,13 @@ protected function describeInputOption(InputOption $option, array $options = arr
75
75
sprintf ('--%s%s ' , $ option ->getName (), $ value )
76
76
);
77
77
78
- $ spacingWidth = $ totalWidth - strlen ($ synopsis ) + 2 ;
78
+ $ spacingWidth = $ totalWidth - strlen ($ synopsis );
79
79
80
- $ this ->writeText (sprintf (' <info>%s</info>%s%s%s%s ' ,
80
+ $ this ->writeText (sprintf (' <info>%s</info> %s%s%s%s ' ,
81
81
$ synopsis ,
82
82
str_repeat (' ' , $ spacingWidth ),
83
- // + 17 = 2 spaces + <info> + </info> + 2 spaces
84
- preg_replace ('/\s*[\r\n]\s*/ ' , "\n" .str_repeat (' ' , $ totalWidth + 17 ), $ option ->getDescription ()),
83
+ // + 4 = 2 spaces before <info>, 2 spaces after </info>
84
+ preg_replace ('/\s*[\r\n]\s*/ ' , "\n" .str_repeat (' ' , $ totalWidth + 4 ), $ option ->getDescription ()),
85
85
$ default ,
86
86
$ option ->isArray () ? '<comment> (multiple values allowed)</comment> ' : ''
87
87
), $ options );
0 commit comments