Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
mschadegg authored and github-actions[bot] committed Feb 29, 2024
1 parent bc9c8f0 commit 0f574ab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Classes/EconomicQueryFilterBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,22 @@ public function where(int|string|Closure $propertyName, ?string $operatorOrValue
return $this->whereNested($propertyName);
}

$operator = !static::isOperator($operatorOrValue) ? static::FILTER_OPERATOR_EQUAL : $operatorOrValue;
$value = is_null($value) && !static::isOperator($operatorOrValue) ? $operatorOrValue : $value;
$operator = ! static::isOperator($operatorOrValue) ? static::FILTER_OPERATOR_EQUAL : $operatorOrValue;
$value = is_null($value) && ! static::isOperator($operatorOrValue) ? $operatorOrValue : $value;

if(is_string($value)) {
if (is_string($value)) {
$value = str_replace(array_keys(static::ESCAPES), array_values(static::ESCAPES), $value);
}

if($value === null) {
if ($value === null) {
$value = static::FILTER_VALUE_NULL;
}

if($value === true) {
if ($value === true) {
$value = 'true';
}

if($value === false) {
if ($value === false) {
$value = 'false';
}

Expand Down Expand Up @@ -172,7 +172,7 @@ public function buildString(): string
$string .= static::FILTER_RELATION_AND;
}

$string .= $filter['property'] . $filter['operator'] . $filter['value'];
$string .= $filter['property'].$filter['operator'].$filter['value'];

$strings[] = $string;
}
Expand Down

0 comments on commit 0f574ab

Please sign in to comment.