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);
}