From 6c5dbd8d4ca4fd68f0d5b2de467c3d2a59e0173c Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 31 Mar 2015 21:50:08 +0100 Subject: [PATCH] #1353 #1347 #1351 - Removing double quotes (confusing) --- .../Tools/Pagination/LimitSubqueryOutputWalker.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php b/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php index 3103b4248..c8317fe31 100644 --- a/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php +++ b/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php @@ -131,7 +131,7 @@ class LimitSubqueryOutputWalker extends SqlWalker || $this->platform instanceof OraclePlatform || $this->platform instanceof SQLAnywherePlatform || $this->platform instanceof DB2Platform - || (method_exists($this->platform, "supportsRowNumberFunction") + || (method_exists($this->platform, 'supportsRowNumberFunction') && $this->platform->supportsRowNumberFunction()); } @@ -156,9 +156,9 @@ class LimitSubqueryOutputWalker extends SqlWalker $orderByItem->expression = $selectAliasToExpressionMap[$orderByItem->expression]; } } - $func = new RowNumberOverFunction("dctrn_rownum"); + $func = new RowNumberOverFunction('dctrn_rownum'); $func->orderByClause = $AST->orderByClause; - $AST->selectClause->selectExpressions[] = new SelectExpression($func, "dctrn_rownum", true); + $AST->selectClause->selectExpressions[] = new SelectExpression($func, 'dctrn_rownum', true); // No need for an order by clause, we'll order by rownum in the outer query. $AST->orderByClause = null; @@ -194,7 +194,7 @@ class LimitSubqueryOutputWalker extends SqlWalker public function walkSelectStatementWithRowNumber(SelectStatement $AST) { $hasOrderBy = false; - $outerOrderBy = " ORDER BY dctrn_minrownum ASC"; + $outerOrderBy = ' ORDER BY dctrn_minrownum ASC'; $orderGroupBy = ''; if ($AST->orderByClause instanceof OrderByClause) { $hasOrderBy = true; @@ -206,8 +206,8 @@ class LimitSubqueryOutputWalker extends SqlWalker $sqlIdentifier = $this->getSQLIdentifier($AST); if ($hasOrderBy) { - $orderGroupBy = " GROUP BY " . implode(', ', $sqlIdentifier); - $sqlIdentifier[] = "MIN(" . $this->walkResultVariable("dctrn_rownum") . ") AS dctrn_minrownum"; + $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlIdentifier); + $sqlIdentifier[] = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum'; } // Build the counter query @@ -511,7 +511,7 @@ class LimitSubqueryOutputWalker extends SqlWalker // Get the root entity and alias from the AST fromClause. $from = $AST->fromClause->identificationVariableDeclarations; if (count($from) !== 1) { - throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction"); + throw new \RuntimeException('Cannot count query which selects two FROM components, cannot make distinction'); } $fromRoot = reset($from);