Skip to content

Commit

Permalink
fix: some changes from cr
Browse files Browse the repository at this point in the history
  • Loading branch information
vpalousek committed Oct 20, 2023
1 parent 13bad85 commit 692c307
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/QueryObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ function($_column) use ($qb, $value, $mode) {

if (is_null($value)) {
$mode = QueryObjectByMode::IS_EMPTY;
}

if (is_array($value) && $mode === QueryObjectByMode::STRICT) {
} else if (is_array($value) && $mode === QueryObjectByMode::STRICT) {
$mode = QueryObjectByMode::IN_ARRAY;
}

Expand Down Expand Up @@ -253,6 +251,10 @@ function($_column) use ($qb, $value, $mode) {
$condition = "$_column IN (:$paramName)";
break;

case QueryObjectByMode::NOT_IN_ARRAY:
$condition = "$_column NOT IN (:$paramName)";
break;

case QueryObjectByMode::GREATER:
$value = "$value";
$condition = "$_column > :$paramName";
Expand Down
1 change: 1 addition & 0 deletions src/QueryObjectByMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum QueryObjectByMode: string
case IS_EMPTY = 'isEmpty';
case IS_NOT_EMPTY = 'isNotEmpty';
case IN_ARRAY = 'isInArray';
case NOT_IN_ARRAY = 'isNotInArray';
case GREATER = 'greater';
case GREATER_OR_EQUAL = 'greaterOrEqual';
case LESS = 'less';
Expand Down

0 comments on commit 692c307

Please sign in to comment.