File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ protected function listCommands() : void
71
71
' ' . CLI ::style ($ name , ForegroundColor::green) . ' '
72
72
// @phpstan-ignore-next-line
73
73
. \str_repeat (' ' , $ width - $ lengths [$ name ])
74
- . $ command ->getDescription ()
74
+ . $ this -> editDescription ( $ command ->getDescription () )
75
75
);
76
76
}
77
77
\ksort ($ groups );
@@ -84,12 +84,21 @@ protected function listCommands() : void
84
84
' ' . CLI ::style ($ name , ForegroundColor::green) . ' '
85
85
// @phpstan-ignore-next-line
86
86
. \str_repeat (' ' , $ width - $ lengths [$ name ])
87
- . $ command ->getDescription ()
87
+ . $ this -> editDescription ( $ command ->getDescription () )
88
88
);
89
89
}
90
90
}
91
91
}
92
92
93
+ protected function editDescription (string $ description ) : string
94
+ {
95
+ $ description = \trim ($ description );
96
+ if (!\str_ends_with ($ description , '. ' )) {
97
+ $ description .= '. ' ;
98
+ }
99
+ return $ description ;
100
+ }
101
+
93
102
/**
94
103
* @param array<string,Command> $commands
95
104
*
You can’t perform that action at this time.
0 commit comments