function MarkdownDescriptor::describeInputOption
Overrides Descriptor::describeInputOption
1 call to MarkdownDescriptor::describeInputOption()
- MarkdownDescriptor::describeInputDefinition in vendor/
symfony/ console/ Descriptor/ MarkdownDescriptor.php - Describes an InputDefinition instance.
File
-
vendor/
symfony/ console/ Descriptor/ MarkdownDescriptor.php, line 57
Class
- MarkdownDescriptor
- Markdown descriptor.
Namespace
Symfony\Component\Console\DescriptorCode
protected function describeInputOption(InputOption $option, array $options = []) : void {
$name = '--' . $option->getName();
if ($option->isNegatable()) {
$name .= '|--no-' . $option->getName();
}
if ($option->getShortcut()) {
$name .= '|-' . str_replace('|', '|-', $option->getShortcut()) . '';
}
$this->write('#### `' . $name . '`' . "\n\n" . ($option->getDescription() ? preg_replace('/\\s*[\\r\\n]\\s*/', "\n", $option->getDescription()) . "\n\n" : '') . '* Accept value: ' . ($option->acceptValue() ? 'yes' : 'no') . "\n" . '* Is value required: ' . ($option->isValueRequired() ? 'yes' : 'no') . "\n" . '* Is multiple: ' . ($option->isArray() ? 'yes' : 'no') . "\n" . '* Is negatable: ' . ($option->isNegatable() ? 'yes' : 'no') . "\n" . '* Default: `' . str_replace("\n", '', var_export($option->getDefault(), true)) . '`');
}