Symfony\Component\Console\Descriptor\TextDescriptor::describeInputArgument PHP Method

describeInputArgument() protected method

protected describeInputArgument ( Symfony\Component\Console\Input\InputArgument $argument, array $options = [] )
$argument Symfony\Component\Console\Input\InputArgument
$options array
    protected function describeInputArgument(InputArgument $argument, array $options = array())
    {
        if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) {
            $default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
        } else {
            $default = '';
        }
        $totalWidth = isset($options['total_width']) ? $options['total_width'] : strlen($argument->getName());
        $spacingWidth = $totalWidth - strlen($argument->getName());
        $this->writeText(sprintf('  <info>%s</info>  %s%s%s', $argument->getName(), str_repeat(' ', $spacingWidth), preg_replace('/\\s*[\\r\\n]\\s*/', "\n" . str_repeat(' ', $totalWidth + 4), $argument->getDescription()), $default), $options);
    }