From 37c757dc1da19dd03cfb026053c8eb44866a7b16 Mon Sep 17 00:00:00 2001 From: Bingo-Soft Date: Sat, 12 Oct 2019 20:49:52 +0300 Subject: [PATCH] Fix code styles in getSQLForSelect --- lib/Doctrine/DBAL/Query/QueryBuilder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 12287daf944..46d7db7a21e 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -480,11 +480,12 @@ public function select($select = null) * ->from('users', 'u') * * - * @return self + * @return $this This QueryBuilder instance. */ public function distinct() : self { $this->sqlParts['distinct'] = true; + return $this; } @@ -1117,7 +1118,7 @@ public function resetQueryPart($queryPartName) */ private function getSQLForSelect() { - $query = 'SELECT ' . ($this->sqlParts['distinct'] ? 'DISTINCT ' : '') . + $query = 'SELECT ' . ($this->sqlParts['distinct'] ? 'DISTINCT ' : '') . implode(', ', $this->sqlParts['select']); $query .= ($this->sqlParts['from'] ? ' FROM ' . implode(', ', $this->getFromClauses()) : '')