protected function filterArguments(array $arguments)
{
if (count($arguments) === 4) {
$lastType = gettype($arguments[3]);
if ($lastType === 'string' && strtoupper($arguments[3]) === 'WITHSCORES') {
// Used for compatibility with older versions
$arguments[3] = array('WITHSCORES' => true);
$lastType = 'array';
}
if ($lastType === 'array') {
$options = $this->prepareOptions(array_pop($arguments));
return array_merge($arguments, $options);
}
}
return $arguments;
}