Skip to content

Commit 02eb1fc

Browse files
committed
fix: restore IN/NOT_IN operator arms in SimpleEquationFilterType
The fix from #35 added these arms to `SimpleEquationElement::__invoke()` on `main`. This branch had already moved that `match` into `SimpleEquationFilterType::buildQuery()`, so the rebase dropped them.
1 parent 3f4c3ca commit 02eb1fc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Filter/Type/SimpleEquationFilterType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public function buildQuery(FilterQueryBuilder $builder, array $options): void
5858
SqlEquationOperator::LESS_THAN_EQUALS => $builder->expr()->lte($operandLeft, ':eq_right'),
5959
SqlEquationOperator::LIKE => $builder->expr()->like($operandLeft, ':eq_right'),
6060
SqlEquationOperator::NOT_LIKE => $builder->expr()->notLike($operandLeft, ':eq_right'),
61+
SqlEquationOperator::IN => $builder->expr()->in($operandLeft, ':eq_right'),
62+
SqlEquationOperator::NOT_IN => $builder->expr()->notIn($operandLeft, ':eq_right'),
6163
SqlEquationOperator::IS_NULL => $builder->expr()->isNull($operandLeft),
64+
// the default arm below is a runtime safety net for operators added to the enum later
65+
// @phpstan-ignore match.alwaysTrue
6266
SqlEquationOperator::IS_NOT_NULL => $builder->expr()->isNotNull($operandLeft),
6367
default => null,
6468
};

0 commit comments

Comments
 (0)