12 namespace Symfony\Component\Console\Descriptor;
35 '**'.$argument->
getName().
':**'.
"\n\n"
36 .
'* Name: '.($argument->
getName() ?:
'<none>').
"\n"
37 .
'* Is required: '.($argument->
isRequired() ?
'yes' :
'no').
"\n"
38 .
'* Is array: '.($argument->
isArray() ?
'yes' :
'no').
"\n"
39 .
'* Description: '.preg_replace(
'/\s*[\r\n]\s*/',
"\n ", $argument->
getDescription() ?:
'<none>').
"\n"
40 .
'* Default: `'.str_replace(
"\n",
'', var_export($argument->
getDefault(),
true)).
'`'
50 '**'.$option->
getName().
':**'.
"\n\n"
51 .
'* Name: `--'.$option->
getName().
'`'.
"\n"
52 .
'* Shortcut: '.($option->
getShortcut() ?
'`-'.implode(
'|-', explode(
'|', $option->
getShortcut())).
'`' :
'<none>').
"\n"
53 .
'* Accept value: '.($option->
acceptValue() ?
'yes' :
'no').
"\n"
54 .
'* Is value required: '.($option->
isValueRequired() ?
'yes' :
'no').
"\n"
55 .
'* Is multiple: '.($option->
isArray() ?
'yes' :
'no').
"\n"
56 .
'* Description: '.preg_replace(
'/\s*[\r\n]\s*/',
"\n ", $option->
getDescription() ?:
'<none>').
"\n"
57 .
'* Default: `'.str_replace(
"\n",
'', var_export($option->
getDefault(),
true)).
'`'
66 if ($showArguments = count($definition->
getArguments()) > 0) {
67 $this->
write(
'### Arguments:');
79 $this->
write(
'### Options:');
80 foreach ($definition->
getOptions() as $option) {
97 .str_repeat(
'-', strlen($command->
getName())).
"\n\n"
101 return $carry .=
' * `'.$usage.
'`'.
"\n";
111 $this->
write(
"\n\n");
121 $describedNamespace = isset($options[
'namespace']) ? $options[
'namespace'] : null;
124 $this->
write($application->
getName().
"\n".str_repeat(
'=', strlen($application->
getName())));
126 foreach ($description->getNamespaces() as $namespace) {
128 $this->
write(
"\n\n");
129 $this->
write(
'**'.$namespace[
'id'].
':**');
132 $this->
write(
"\n\n");
133 $this->
write(implode(
"\n", array_map(
function ($commandName) {
134 return '* '.$commandName;
135 }, $namespace[
'commands'])));
138 foreach ($description->getCommands() as $command) {
139 $this->
write(
"\n\n");