src/Argument/Summary.php
public function argument(Argument $argument)
    {
        $summary     = $this->prefixedArguments($argument);
        $printedName = mb_strstr($summary, ' ' . $argument->name());

        // Print the argument name if it's not printed yet.
        if (!$printedName && !$argument->noValue()) {
            $summary .= $argument->name();
        }

        if ($defaults = $argument->defaultValue()) {
            if (count($defaults) == 1) {
                $summary .= " (default: {$defaults[0]})";
            } else {
                $summary .= ' (defaults: ' . implode(', ', $defaults) . ')';
            }
        }

        return $summary;
    }
public function argument(Argument $argument)
    {
        $summary     = $this->prefixedArguments($argument);
        $printedName = mb_strstr($summary, ' ' . $argument->name());

        // Print the argument name if it's not printed yet.
        if (!$printedName && !$argument->noValue()) {
            $summary .= $argument->name();
        }

        if ($defaults = $argument->defaultValue()) {
            if (count($defaults) == 1) {
                $summary .= " (default: {$defaults[0]})";
            } else {
                $summary .= ' (defaults: ' . implode(', ', $defaults) . ')';
            }
        }

        return $summary;
    }
public function argument ( Argument $ argument ) { $ summary = $ this -> prefixedArguments ( $ argument ) ; $ printedName = mb_strstr ( $ summary , ' ' . $ argument -> name ( ) ) ; // Print the argument name if it's not printed yet. if ( ! $ printedName && ! $ argument -> noValue ( ) ) { $ summary .= $ argument -> name ( ) ; } if ( $ defaults = $ argument -> defaultValue ( ) ) { if ( count ( $ defaults ) == 1 ) { $ summary .= " (default: {$defaults[0]})" ; } else { $ summary .= ' (defaults: ' . implode ( ', ' , $ defaults ) . ')' ; } } return $ summary ; }
Build an argument's summary for use in a usage statement.

For example, "-u username, --user username", "--force", or
"-c count (default: 7)".

@param Argument $argument

@return string
Build an argument s summary for use in a usage statement .