Variable number of argument of things we're likey to be able to make a set out of.

@param See $this->addHelper()
..
@return $this
344525
public function add()
    {

        if( !$args = func_get_args() ) {
            return $this;
        }

        $intervals = array_map(
            array($this, 'addHelper'),
            $args
        );
        $intervals[] = $this->intervals;

        $output = array();

        // merge the lot
        $intervals = call_user_func_array( 'array_merge', $intervals );

        usort( $intervals, array( $this, "sortIntervals" ) );

        $working = null;
        while( list(,$current) = each($intervals) ) {

            // we got anything to compare against
            if( $working === null ) {

                $working = $current;

            // we've maxed out - everything else is going to match this!
            } elseif ( $working[1] === null ) {

                break;

            // is current lower bound contained in our working interval
            // or isContinuous()
            } elseif (
                $this->sort( $working[1], $current[0], self::NULL_IS_HIGH ) >= 0 or
                $this->isContinuous( $working[1], $current[0] )
            ) {

                // get the maximum upper bound
                $working[1] = $this->max( $working[1], $current[1], self::NULL_IS_HIGH );

            // intervals are distinct, add to output
            } else {

                $output[] = $working;
                $working = $current;

            }

        }

        if( !is_null( $working ) ) {
            $output[] = $working;
        }

        $this->intervals = $output;
        return $this;

    }
1320553
public function with($arg)
    {
        $args = func_get_args();

        if (is_array($args[0])) {
            $this->setWith($args[0]);

            return $this;
        }

        foreach ($args as $arg) {
            if (is_string($arg)) {
                $this->addWith($arg);
            }

            return $this;
        }

        throw new DatabaseException('The arguments for with() don\'t fit');
    }
391233
public function loadHelpers()
    {
        $registry = $this->helpers();
        $helpers = $registry->normalizeArray($this->helpers);
        foreach ($helpers as $properties) {
            $this->loadHelper($properties['class'], $properties['config']);
        }

        return $this;
    }
291762
public function withAnyArgs()
    {
        $this->expectation->setMatchesCallback(function($name, $args) {
            if ($name == $this->methodName) {
                return true;
            } else {
                return false;
            }
        });

        $this->commentBuilder->setAnyArgs();
        
        return $this;
    }
1055256
public function addGroup()
    {
        $conditions = func_get_args();
        $arr        = array();

        foreach ($conditions as $condition) {
            if (is_array($condition) and count($condition) >= 2) {
                $this->add($condition[0], $condition[1], $condition[2]);

                end($this->_conditions);
                $arr[] = array(key($this->_conditions) => current($this->_conditions));
                array_pop($this->_conditions);
            }
        }

        $this->_conditions[] = $arr;

        return $this;
    }
82931
public static function add(callable ...$args): callable
    {
        $sum = function ($x, ... $args) {
            $function = 0;
            foreach ($args as $arg) {
                $function += $arg($x);
            }
            return $function;
        };

        return function ($x) use ($args, $sum) {
            return $sum(...array_merge([$x], $args));
        };
    }
306203
public function setHelp($help)
    {
        if (null !== $help) {
            Assert::string($help, 'The help text must be a string. Got: %s');
            Assert::notEmpty($help, 'The help text must not be empty.');
        }

        $this->help = $help;

        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;
    }
1252363
public function setNum($num = 20)
    {
        if (!is_numeric($num) && $num !== self::SEARCH_ALL) {
            throw new \InvalidArgumentException(
                'Argument can only be numeric or "all" to return all results.'
            );
        }
        $this->otherOptions['num'] = $num;

        return $this;
    }
1225954
public function addOptions($options)
    {
        if (is_array($this->options)) {
            $this->options = array_merge($this->options, $options);
        } else {
            $this->options = $options;
        }

        return $this;
    }
150675
public function with($parameters)
    {
        $this->parameters = array_merge($this->parameters, is_array($parameters) ? $parameters : func_get_args());

        return $this;
    }
318151
public function addArgument($name, $value)
    {
        if (!isset($this->arguments[$name])) {
            $this->arguments[$name] = $value;
        }

        return $this;
    }
1300343
public function addArguments(?string $arguments = null)
    {
        $args = [];
        preg_match_all('/(?P<argument>\w+):(?P<value>[\w+\-]+)/', $arguments, $matches);
        if (isset($matches['argument'])) {
            foreach ($matches['argument'] as $key => $argKey) {
                if (isset($matches['value'][$key])) {
                    $args[$argKey] = $matches['value'][$key];
                }
            }
        }
        $this->arguments = $args;
    }
1128467
public function addBuilderDirective(string $argumentName, ArgBuilderDirective $argBuilderDirective): self
    {
        $this->builderDirectives[$argumentName] = $argBuilderDirective;

        return $this;
    }
666603
public function setAddition($value)
    {
        $this->data->amount->subtotals->addition = $this->convertAmount($value);

        return $this;
    }
328441
public function set()
    {
        $args = func_get_args();

        if (count($args) == 2) {
            $this->attributes[$args[0]] = $args[1];
        } elseif (count($args) == 1 && is_array($args[0])) {
            $this->attributes = (array_merge($this->attributes, $args[0]));
        }

        return $this;
    }
897908
protected function addHelpValue($key, $value)
    {
        if (is_object($value)) {
            throw new \InvalidArgumentException(sprintf('The HelpValue with ID "%s" you are trying to add is an object. Use $this->addHelpMock() instead.', $key));
        }

        if (isset($this->helpValues[$key])) {
            throw new \LogicException('The HelpValue you are trying to add is already set. Set the fourth parameter to "true" to overwrite it.');
        }

        $this->helpValues[$key] = $value;

        return $this;
    }