From 148789600a8472387c90200483d64b175e08cb94 Mon Sep 17 00:00:00 2001 From: Kirill chEbba Chebunin Date: Mon, 20 Aug 2012 13:39:29 +0400 Subject: [PATCH] Remove unnecessary else statements after if with return in QueryExpressionVisitor --- lib/Doctrine/ORM/Query/QueryExpressionVisitor.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php b/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php index 614dc57e2..ca1e7da4f 100644 --- a/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php +++ b/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php @@ -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());