1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Remove unnecessary else statements after if with return in QueryExpressionVisitor

This commit is contained in:
Kirill chEbba Chebunin 2012-08-20 13:39:29 +04:00
parent c6b3899c2d
commit 148789600a

View File

@ -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());