Platformsh\Cli\Console\CustomMarkdownDescriptor::describeInputOption PHP Метод

describeInputOption() защищенный Метод

protected describeInputOption ( Symfony\Component\Console\Input\InputOption $option, array $options = [] )
$option Symfony\Component\Console\Input\InputOption
$options array
    protected function describeInputOption(InputOption $option, array $options = [])
    {
        $this->write('* **`--' . $option->getName() . "`**");
        if ($shortcut = $option->getShortcut()) {
            $this->write(" (`-" . implode('|-', explode('|', $shortcut)) . "`)");
        }
        $notes = [];
        if ($option->isArray()) {
            $notes[] = 'multiple values allowed';
        } elseif ($option->acceptValue()) {
            $notes[] = 'expects a value';
        }
        if ($notes) {
            $this->write(' (' . implode('; ', $notes) . ')');
        }
        if ($description = $option->getDescription()) {
            $this->write("  \n  " . $description);
        }
        if ($option->acceptValue() && $option->getDefault()) {
            $default = var_export($option->getDefault(), true);
            $this->write("  \n  Default: `{$default}`");
        }
    }