public function argument(string $raw, string $desc = '', $default = null): self
    {
        $argument = new Argument($raw, $desc, $default);

        if ($this->_argVariadic) {
            throw new InvalidParameterException('Only last argument can be variadic');
        }

        if ($argument->variadic()) {
            $this->_argVariadic = true;
        }

        $this->register($argument);

        return $this;
    }
public function argument(string $raw, string $desc = '', $default = null): self
    {
        $argument = new Argument($raw, $desc, $default);

        if ($this->_argVariadic) {
            throw new InvalidParameterException('Only last argument can be variadic');
        }

        if ($argument->variadic()) {
            $this->_argVariadic = true;
        }

        $this->register($argument);

        return $this;
    }
public function argument ( string $ raw , string $ desc = '' , $ default = null ) : self { $ argument = new Argument ( $ raw , $ desc , $ default ) ; if ( $ this -> _argVariadic ) { throw new InvalidParameterException ( 'Only last argument can be variadic' ) ; } if ( $ argument -> variadic ( ) ) { $ this -> _argVariadic = true ; } $ this -> register ( $ argument ) ; return $ this ; }
Register an argument.

@param string $raw
@param string $desc
@param mixed  $default

@return self
Register an argument .