You are here

protected function MarkdownDescriptor::describeInputArgument in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Descriptor/MarkdownDescriptor.php \Symfony\Component\Console\Descriptor\MarkdownDescriptor::describeInputArgument()

Describes an InputArgument instance.

Parameters

InputArgument $argument:

array $options:

Return value

string|mixed

Overrides Descriptor::describeInputArgument

1 call to MarkdownDescriptor::describeInputArgument()
MarkdownDescriptor::describeInputDefinition in vendor/symfony/console/Descriptor/MarkdownDescriptor.php
Describes an InputDefinition instance.

File

vendor/symfony/console/Descriptor/MarkdownDescriptor.php, line 32

Class

MarkdownDescriptor
Markdown descriptor.

Namespace

Symfony\Component\Console\Descriptor

Code

protected function describeInputArgument(InputArgument $argument, array $options = array()) {
  $this
    ->write('**' . $argument
    ->getName() . ':**' . "\n\n" . '* Name: ' . ($argument
    ->getName() ?: '<none>') . "\n" . '* Is required: ' . ($argument
    ->isRequired() ? 'yes' : 'no') . "\n" . '* Is array: ' . ($argument
    ->isArray() ? 'yes' : 'no') . "\n" . '* Description: ' . preg_replace('/\\s*[\\r\\n]\\s*/', "\n  ", $argument
    ->getDescription() ?: '<none>') . "\n" . '* Default: `' . str_replace("\n", '', var_export($argument
    ->getDefault(), true)) . '`');
}