1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Merge pull request #6685 from votemike/update-maxresult-docblocks

Updating `Query#$_maxResults` to allow for `null` (no limit)
This commit is contained in:
Marco Pivetta 2017-09-04 11:40:06 +02:00 committed by GitHub
commit 8b81691e77
3 changed files with 7 additions and 7 deletions

View File

@ -163,7 +163,7 @@ final class Query extends AbstractQuery
/**
* The maximum number of results to return (the "limit").
*
* @var integer
* @var integer|null
*/
private $_maxResults = null;
@ -628,7 +628,7 @@ final class Query extends AbstractQuery
/**
* Sets the maximum number of results to retrieve (the "limit").
*
* @param integer $maxResults
* @param integer|null $maxResults
*
* @return Query This query object.
*/
@ -644,7 +644,7 @@ final class Query extends AbstractQuery
* Gets the maximum number of results the query object was set to retrieve (the "limit").
* Returns NULL if {@link setMaxResults} was not applied to this query.
*
* @return integer Maximum number of results.
* @return integer|null Maximum number of results.
*/
public function getMaxResults()
{

View File

@ -107,7 +107,7 @@ class QueryBuilder
/**
* The maximum number of results to retrieve.
*
* @var integer
* @var integer|null
*/
private $_maxResults = null;
@ -653,7 +653,7 @@ class QueryBuilder
/**
* Sets the maximum number of results to retrieve (the "limit").
*
* @param integer $maxResults The maximum number of results to retrieve.
* @param integer|null $maxResults The maximum number of results to retrieve.
*
* @return self
*/
@ -668,7 +668,7 @@ class QueryBuilder
* Gets the maximum number of results the query object was set to retrieve (the "limit").
* Returns NULL if {@link setMaxResults} was not applied to this query builder.
*
* @return integer Maximum number of results.
* @return integer|null Maximum number of results.
*/
public function getMaxResults()
{

View File

@ -136,7 +136,7 @@ class LimitSubqueryWalker extends TreeWalkerAdapter
$fromRoot = reset($from);
if ($query instanceof Query
&& $query->getMaxResults()
&& null !== $query->getMaxResults()
&& $AST->orderByClause
&& count($fromRoot->joins)) {
// Check each orderby item.