diff --git a/src/Filters/BooleanFilter.php b/src/Filters/BooleanFilter.php index 8dfb6ba..5dd3f32 100644 --- a/src/Filters/BooleanFilter.php +++ b/src/Filters/BooleanFilter.php @@ -2,7 +2,6 @@ namespace UKFast\Sieve\Filters; -use Illuminate\Database\Query\Builder; use UKFast\Sieve\ModifiesQueries; use UKFast\Sieve\SearchTerm; @@ -14,9 +13,9 @@ public function __construct(protected $trueVal = 1, protected $falseVal = 0) public function modifyQuery($query, SearchTerm $search): void { - $op = '='; + $operator = '='; if ($search->operator() == 'neq') { - $op = '!='; + $operator = '!='; } $searchTerm = true; @@ -24,7 +23,7 @@ public function modifyQuery($query, SearchTerm $search): void $searchTerm = false; } - $query->where($search->column(), $op, $searchTerm ? $this->trueVal : $this->falseVal); + $query->where($search->column(), $operator, $searchTerm ? $this->trueVal : $this->falseVal); } public function operators(): array