Modify the current criteria to match the supplied arguments.

@param mixed ...$arguments The arguments.

@return $this This stub.
352626
public function with(...$arguments): Stub
    {
        $this->closeRule();

        if (empty($this->rules)) {
            $defaultAnswerCallback = $this->defaultAnswerCallback;
            $defaultAnswerCallback($this);
            $this->closeRule();
        }

        $this->criteria = $this->matcherFactory->adaptAll($arguments);

        return $this;
    }
1218782
public function removeArgument($arg)
    {
        if (($key = array_search($arg, $this->arguments)) !== false) {
            unset($this->arguments[$key]);
        }

        return $this;
    }
246538
public function finalArguments($self, Arguments $arguments): Arguments
    {
        $finalArguments = $this->arguments->all();

        if ($this->prefixSelf) {
            array_unshift($finalArguments, $self);
        }
        if ($this->suffixArgumentsObject) {
            $finalArguments[] = $arguments;
        }

        if ($this->suffixArguments && $arguments) {
            $finalArguments = array_merge($finalArguments, $arguments->all());
        }

        return new Arguments($finalArguments);
    }
265906
public function setArguments(array $arguments)
    {
    	foreach ($arguments as $k => $v) {
    		$this->arguments[$k] = $v;
    	}
        
        return $this;
    }
66057
public function setupSupportedArgs($arguments = [])
    {
        $defaults = [
            'help' => 'The help menu',
        ];

        $arguments = array_merge($defaults, $arguments);

        $this->supportedArgs = $arguments;

        return $this;
    }
1202060
public static function create(...$arguments)
    {
        trigger_error(__METHOD__.'() has been deprecated and will be removed from v2.', E_USER_DEPRECATED);

        if (isset($arguments[0]) && is_string($arguments[0])) {
            return new static([], $arguments[0], $arguments[1] ?? []);
        }

        return new static(...$arguments);
    }
887192
public function passthru(array $arguments = [])
    {
        passthru($this->getBin() . $this->prepareCommand($arguments), $exitCode);
        return $exitCode;
    }
588526
protected function filterPrefix(array $arguments)
    {
        if (empty($arguments)) {
            throw new InvalidCallException('At least one argument needed');
        }
        $path = array_shift($arguments);
        if (!is_string($path)) {
            throw new InvalidParamException('First argument should be a string');
        }
        if (!preg_match('#^[a-zA-Z0-9]+\:\/\/.*#', $path)) {
            throw new InvalidParamException('No prefix detected in for path: ' . $path);
        }
        list ($prefix, $path) = explode('://', $path, 2);
        array_unshift($arguments, $path);
        return array($prefix, $arguments);
    }
98144
public function addArgument($arg)
    {
        if (!is_scalar($arg)) {
            throw new InvalidArgumentException('scalar', 0);
        }
        if (!in_array($arg, $this->arguments)) {
            $this->arguments[] = $arg;
        }

        return $this;
    }
1016718
public function setArgs(array $args)
    {
        foreach ($args as $k => $v) {
            if (is_numeric($k)) {
                $this->args[$k] = $v;
            } else {
                $this->kwargs[$k] = $v;
            }
            ksort($this->args);
        }
        return $this;
    }
745661
public function mergeArguments(array $arguments)
    {
        foreach ($arguments as $key => &$value) {
            $this->arguments[$key] = &$value;
        }

        return $this;
    }
1288156
public function invokeWith($arguments = [])
    {
        if ($this->exception) {
            throw $this->exception;
        }

        if ($this->isUncallable) {
            return $this->returnValue;
        }

        if (!$arguments instanceof Arguments) {
            $arguments = new Arguments($arguments);
        }

        return $this->callMagicMethod
            ->invoke($this->mock, $this->name, $arguments);
    }
246469
public function addArguments($arguments = [])
    {
        if (null !== $arguments) {
            foreach ($arguments as $argument) {
                $this->setArgument($argument);
            }
        }
    }
878955
public function orHaving(...$args): self
    {
        $this->createToken('OR', $args, $this->havingTokens, $this->havingWrapper());

        return $this;
    }
37415
private static function getArguments(array $arguments = [])
    {
        $args = [];

        foreach ($arguments as $argument) {
            $args[] = $argument instanceof self ? $argument->getMoney() : $argument;
        }

        return $args;
    }
764788
public function addArgument(Argument $argument, $force = true)
    {
        if (isset($this->arguments[$argument->name]) && ! $force) {
            return $this;
        }

        $this->arguments[$argument->name] = $argument;

        return $this;
    }
1368600
protected function makeRequired($argument)
    {
        if ($argument instanceof TypeInterface) {
            $argument = new NonNullType($argument);
        } elseif(is_array($argument)) {
            $argument['type'] = new NonNullType($argument['type']);
        }

        return $argument;
    }