Eloquent\Phony\Stub\StubData::setsArgument PHP Method

setsArgument() public method

If called with no arguments, sets the first argument to null. If called with one argument, sets the first argument to $indexOrValue. If called with two arguments, sets the argument at $indexOrValue to $value.
public setsArgument ( mixed $indexOrValue = null, mixed $value = null )
$indexOrValue mixed The index, or value if no index is specified.
$value mixed The value.
    public function setsArgument($indexOrValue = null, $value = null)
    {
        if (func_num_args() > 1) {
            $index = $indexOrValue;
        } else {
            $index = 0;
            $value = $indexOrValue;
        }
        if ($value instanceof InstanceHandle) {
            $value = $value->get();
        }
        return $this->callsWith(function ($arguments) use($index, $value) {
            $arguments->set($index, $value);
        }, array(), false, true, false);
    }