Skip to content

Commit 8e41446

Browse files
committed
upsome
1 parent c952316 commit 8e41446

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Component/Formatter/Title.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ public static function show(string $title, array $opts = []): void
3636
$width = (int)$opts['width'];
3737
$char = trim($opts['char']);
3838
$indent = (int)$opts['indent'] >= 0 ? $opts['indent'] : 2;
39-
$indentStr = Str::pad(self::CHAR_SPACE, $indent, self::CHAR_SPACE);
39+
40+
$indentStr = '';
41+
if ($indent > 0) {
42+
$indentStr = Str::pad(self::CHAR_SPACE, $indent, self::CHAR_SPACE);
43+
}
4044

4145
$title = $opts['ucWords'] ? ucwords(trim($title)) : trim($title);
4246
$tLength = Str::len($title);

0 commit comments

Comments
 (0)