Remove unnecessary else statements after if with return in QueryExpressionVisitor
This commit is contained in:
parent
c6b3899c2d
commit
148789600a
@ -132,19 +132,16 @@ class QueryExpressionVisitor extends ExpressionVisitor
|
||||
case Comparison::IS:
|
||||
if ($this->walkValue($comparison->getValue()) === null) {
|
||||
return $this->expr->isNull($comparison->getField());
|
||||
} else {
|
||||
$this->parameters->add($parameter);
|
||||
return $this->expr->eq($comparison->getField(), $placeholder);
|
||||
}
|
||||
$this->parameters->add($parameter);
|
||||
return $this->expr->eq($comparison->getField(), $placeholder);
|
||||
|
||||
case Comparison::NEQ:
|
||||
if ($this->walkValue($comparison->getValue()) === null) {
|
||||
return $this->expr->isNotNull($comparison->getField());
|
||||
} else {
|
||||
$this->parameters->add($parameter);
|
||||
return $this->expr->neq($comparison->getField(), $placeholder);
|
||||
}
|
||||
|
||||
$this->parameters->add($parameter);
|
||||
return $this->expr->neq($comparison->getField(), $placeholder);
|
||||
|
||||
default:
|
||||
$operator = self::convertComparisonOperator($comparison->getOperator());
|
||||
|
Loading…
x
Reference in New Issue
Block a user