mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-06-02 12:53:33 +00:00
Changing how arguments are shown in help output.
This commit is contained in:
parent
3e1554f5bb
commit
037bc6cb2f
2 changed files with 4 additions and 3 deletions
cake
|
@ -90,6 +90,7 @@ class ConsoleInputArgument {
|
|||
if (!empty($this->_choices)) {
|
||||
$name = implode('|', $this->_choices);
|
||||
}
|
||||
$name = '<' . $name . '>';
|
||||
if (!$this->isRequired()) {
|
||||
$name = '[' . $name . ']';
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ TEXT;
|
|||
$result = $parser->help();
|
||||
$expected = <<<TEXT
|
||||
<info>Usage:</info>
|
||||
cake mycommand [-h] [--test] model [other_longer]
|
||||
cake mycommand [-h] [--test] <model> [<other_longer>]
|
||||
|
||||
<info>Options:</info>
|
||||
|
||||
|
@ -455,7 +455,7 @@ TEXT;
|
|||
$result = $parser->help();
|
||||
$expected = <<<TEXT
|
||||
<info>Usage:</info>
|
||||
cake mycommand [-h] [--test one|two] aco|aro [other_longer]
|
||||
cake mycommand [-h] [--test one|two] <aco|aro> [<other_longer>]
|
||||
|
||||
<info>Options:</info>
|
||||
|
||||
|
@ -488,7 +488,7 @@ TEXT;
|
|||
Description text
|
||||
|
||||
<info>Usage:</info>
|
||||
cake mycommand [-h] [--test] model
|
||||
cake mycommand [-h] [--test] <model>
|
||||
|
||||
<info>Options:</info>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue