public function process()
{
if ($this->skip()) {
return;
}
$value = $this->value();
if (!is_scalar($value)) {
return;
}
if (is_string($value)) {
$value = strtolower($value);
}
$bool = null;
if (in_array($value, $this->config('truthy'), true)) {
$bool = true;
} elseif (in_array($value, $this->config('falsy'), true)) {
$bool = false;
}
if ($bool !== null) {
$this->query()->andWhere([$this->field() => $bool]);
}
}