From 52af7f5d35a621cf59b1834aef0a401776458ed4 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 25 Aug 2024 07:00:21 -0400 Subject: [PATCH] Clean up argument formatting in help command. --- src/Command/Command.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Command/Command.php b/src/Command/Command.php index b9dc1b8a..a282943c 100644 --- a/src/Command/Command.php +++ b/src/Command/Command.php @@ -140,9 +140,11 @@ private function argumentsAsText(): string $default = ''; } + $name = $argument->getName(); + $pad = \str_pad('', $max - \strlen($name)); $description = \str_replace("\n", "\n".\str_pad('', $max + 2, ' '), $argument->getDescription()); - $messages[] = \sprintf(" %-{$max}s %s%s", $argument->getName(), $description, $default); + $messages[] = \sprintf(' %s%s %s%s', $name, $pad, $description, $default); } $messages[] = '';