mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
fix command help format
This commit is contained in:
parent
35e23a7cbc
commit
dab91f526e
@ -103,20 +103,20 @@ class CommandInfoUtil
|
||||
$lines[0][] = "<{$arg_name}: {$arg_info['type']}>";
|
||||
} else {
|
||||
$buffer = "[{$arg_name}: {$arg_info['type']}";
|
||||
if ($arg_info['default'] !== null) {
|
||||
if (!empty($arg_info['default'])) {
|
||||
$buffer .= " = {$arg_info['default']}";
|
||||
}
|
||||
$lines[0][] = $buffer . ']';
|
||||
}
|
||||
|
||||
$lines[1][] = "{$arg_name};{$arg_info['description']}";
|
||||
$lines[][] = "{$arg_name};{$arg_info['description']}";
|
||||
}
|
||||
|
||||
$buffer = '';
|
||||
$buffer = [];
|
||||
foreach ($lines as $line) {
|
||||
$buffer .= implode(' ', $line) . "\n";
|
||||
$buffer[] = implode(' ', $line);
|
||||
}
|
||||
return $buffer;
|
||||
return implode("\n", $buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user