From 8eef0beacb5250d3776566b08f91471d04113553 Mon Sep 17 00:00:00 2001 From: ReenExe Date: Fri, 1 Jul 2016 01:20:52 +0300 Subject: [PATCH] clear code --- lib/Doctrine/ORM/Query/Parser.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 7619359ce..6f8eda514 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -827,17 +827,13 @@ class Parser return; } - $foundRootEntity = false; - foreach ($this->identVariableExpressions as $dqlAlias => $expr) { if (isset($this->queryComponents[$dqlAlias]) && $this->queryComponents[$dqlAlias]['parent'] === null) { - $foundRootEntity = true; + return; } } - if ( ! $foundRootEntity) { - $this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.'); - } + $this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.'); } /**