public function setArguments(array $arguments)
{
$options = [];
if (!empty($arguments)) {
if (!$this->checkFixedArray($arguments, count($arguments) > 1 ? 2 : 1) || !is_numeric($arguments[0]) || isset($arguments[1]) && !is_array($arguments[1])) {
throw new InvalidCommandArgumentException($this, $arguments);
}
if (isset($arguments[1])) {
$options = $arguments[1];
$this->checkOptionsInt($options, ['count', 'minlen', 'maxlen', 'importrate']);
}
}
$this->arguments = array_merge([!empty($arguments) ? (int) $arguments[0] : 0], $this->toArguments($options));
}