Skip to content

Commit

Permalink
Merge pull request #10072 from greg0ire/fix-return-type
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire authored Sep 27, 2022
2 parents 2e7c2bb + 9130b27 commit 6e8afee
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/Doctrine/ORM/Persisters/SqlValueVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SqlValueVisitor extends ExpressionVisitor
/**
* Converts a comparison expression into the target query language output.
*
* @return void
* {@inheritDoc}
*/
public function walkComparison(Comparison $comparison)
{
Expand All @@ -32,35 +32,39 @@ public function walkComparison(Comparison $comparison)
$operator = $comparison->getOperator();

if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) {
return;
return null;
} elseif ($operator === Comparison::NEQ && $value === null) {
return;
return null;
}

$this->values[] = $value;
$this->types[] = [$field, $value, $operator];

return null;
}

/**
* Converts a composite expression into the target query language output.
*
* @return void
* {@inheritDoc}
*/
public function walkCompositeExpression(CompositeExpression $expr)
{
foreach ($expr->getExpressionList() as $child) {
$this->dispatch($child);
}

return null;
}

/**
* Converts a value expression into the target query language part.
*
* @return void
* {@inheritDoc}
*/
public function walkValue(Value $value)
{
return;
return null;
}

/**
Expand Down

0 comments on commit 6e8afee

Please sign in to comment.