protected function filterValue($values) : array
{
if (!is_array($values)) {
$values = [$values];
}
$lines = [];
foreach ($values as $value) {
if (is_numeric($value) || is_null($value) || is_object($value) && method_exists($value, '__toString')) {
$value = (string) $value;
} elseif (!is_string($value)) {
throw new InvalidValueException('Query values must be strings or an array of strings.');
}
$lines[] = decode($value);
}
return $lines;
}