From 228a501014fa0e0de30019154bf755faf5786fc5 Mon Sep 17 00:00:00 2001 From: flip111 Date: Tue, 1 Oct 2013 16:53:53 +0200 Subject: [PATCH] Made the code prettier :) --- lib/Doctrine/ORM/Query/SqlWalker.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 946579b8a..fb6177919 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -1624,13 +1624,17 @@ class SqlWalker implements TreeWalker // ResultVariable if (isset($this->queryComponents[$groupByItem]['resultVariable'])) { - if ($this->queryComponents[$groupByItem]['resultVariable'] instanceof AST\PathExpression) { - return $this->walkPathExpression($this->queryComponents[$groupByItem]['resultVariable']); - } elseif (isset($this->queryComponents[$groupByItem]['resultVariable']->pathExpression)) { - return $this->walkPathExpression($this->queryComponents[$groupByItem]['resultVariable']->pathExpression); - } else { - return $this->walkResultVariable($groupByItem); + $resultVariable = $this->queryComponents[$groupByItem]['resultVariable']; + + if ($resultVariable instanceof AST\PathExpression) { + return $this->walkPathExpression($resultVariable); } + + if (isset($resultVariable->pathExpression)) { + return $this->walkPathExpression($resultVariable->pathExpression); + } + + return $this->walkResultVariable($groupByItem); } // IdentificationVariable