src/Argument/Manager.php
public function add($argument, array $options = [])
    {
        if (is_array($argument)) {
            $this->addMany($argument);
            return;
        }

        if (is_string($argument)) {
            $argument = Argument::createFromArray($argument, $options);
        }

        if (!$argument instanceof Argument) {
            throw new InvalidArgumentException('Please provide an argument name or object.');
        }

        $this->arguments[$argument->name()] = $argument;
    }
public function add($argument, array $options = [])
    {
        if (is_array($argument)) {
            $this->addMany($argument);
            return;
        }

        if (is_string($argument)) {
            $argument = Argument::createFromArray($argument, $options);
        }

        if (!$argument instanceof Argument) {
            throw new InvalidArgumentException('Please provide an argument name or object.');
        }

        $this->arguments[$argument->name()] = $argument;
    }
public function add ( $ argument , array $ options = [ ] ) { if ( is_array ( $ argument ) ) { $ this -> addMany ( $ argument ) ; return ; } if ( is_string ( $ argument ) ) { $ argument = Argument :: createFromArray ( $ argument , $ options ) ; } if ( ! $ argument instanceof Argument ) { throw new InvalidArgumentException ( 'Please provide an argument name or object.' ) ; } $ this -> arguments [ $ argument -> name ( ) ] = $ argument ; }
Add an argument.

@param Argument|string|array $argument
@param $options

@return void
@throws InvalidArgumentException if $argument isn't an array or Argument object.
Add an argument .