From b99f4461bef88b0a3a48bbe088af7a5aa444eb98 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 13 Jan 2015 14:37:32 +0100 Subject: [PATCH] #1246 DDC-3487 - re-aligning SQL string concatenation for readability, fixed docblock return value hint --- lib/Doctrine/ORM/Persisters/ManyToManyPersister.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php b/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php index b40cd488a..eff275359 100644 --- a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php +++ b/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php @@ -249,7 +249,9 @@ class ManyToManyPersister extends AbstractCollectionPersister * * @param array $mapping Array containing mapping information. * - * @return string The SQL query part to add to a query. + * @return string[] ordered tuple: + * - JOIN condition to add to the SQL + * - WHERE condition to add to the SQL */ public function getFilterSql($mapping) { @@ -262,11 +264,9 @@ class ManyToManyPersister extends AbstractCollectionPersister } // A join is needed if there is filtering on the target entity - $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); - $joinSql = ' JOIN ' . $tableName . ' te' . ' ON'; - $onConditions = $this->getOnConditionSQL($mapping); - - $joinSql .= implode(' AND ', $onConditions); + $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); + $joinSql = ' JOIN ' . $tableName . ' te' + . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); return array($joinSql, $filterSql); }