From 8d62aadf55ef003db078af5fea03d6839e722b0f Mon Sep 17 00:00:00 2001 From: Damien Gavard Date: Wed, 26 Aug 2015 18:08:28 +0200 Subject: [PATCH 1/5] Fix invalid return type in docblock --- lib/Doctrine/ORM/QueryBuilder.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/QueryBuilder.php b/lib/Doctrine/ORM/QueryBuilder.php index ee733db89..b6c41c634 100644 --- a/lib/Doctrine/ORM/QueryBuilder.php +++ b/lib/Doctrine/ORM/QueryBuilder.php @@ -183,7 +183,7 @@ class QueryBuilder * * @param boolean $cacheable * - * @return \Doctrine\ORM\AbstractQuery This query instance. + * @return QueryBuilder */ public function setCacheable($cacheable) { @@ -203,7 +203,7 @@ class QueryBuilder /** * @param string $cacheRegion * - * @return \Doctrine\ORM\AbstractQuery This query instance. + * @return QueryBuilder */ public function setCacheRegion($cacheRegion) { @@ -234,7 +234,8 @@ class QueryBuilder * Sets the life-time for this query into second level cache. * * @param integer $lifetime - * @return \Doctrine\ORM\AbstractQuery This query instance. + * + * @return QueryBuilder */ public function setLifetime($lifetime) { @@ -253,7 +254,8 @@ class QueryBuilder /** * @param integer $cacheMode - * @return \Doctrine\ORM\AbstractQuery This query instance. + * + * @return QueryBuilder */ public function setCacheMode($cacheMode) { From 15aafaa11dd774dc866f51ccb361f140c58c8783 Mon Sep 17 00:00:00 2001 From: Damien Gavard Date: Thu, 27 Aug 2015 10:44:58 +0200 Subject: [PATCH 2/5] Use @return $this instead of return explicitly QueryBuilder --- lib/Doctrine/ORM/QueryBuilder.php | 66 +++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/Doctrine/ORM/QueryBuilder.php b/lib/Doctrine/ORM/QueryBuilder.php index b6c41c634..aecc6b2ca 100644 --- a/lib/Doctrine/ORM/QueryBuilder.php +++ b/lib/Doctrine/ORM/QueryBuilder.php @@ -183,7 +183,7 @@ class QueryBuilder * * @param boolean $cacheable * - * @return QueryBuilder + * @return $this */ public function setCacheable($cacheable) { @@ -203,7 +203,7 @@ class QueryBuilder /** * @param string $cacheRegion * - * @return QueryBuilder + * @return $this */ public function setCacheRegion($cacheRegion) { @@ -235,7 +235,7 @@ class QueryBuilder * * @param integer $lifetime * - * @return QueryBuilder + * @return $this */ public function setLifetime($lifetime) { @@ -255,7 +255,7 @@ class QueryBuilder /** * @param integer $cacheMode * - * @return QueryBuilder + * @return $this */ public function setCacheMode($cacheMode) { @@ -527,7 +527,7 @@ class QueryBuilder * @param mixed $value The parameter value. * @param string|null $type PDO::PARAM_* or \Doctrine\DBAL\Types\Type::* constant * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function setParameter($key, $value, $type = null) { @@ -571,7 +571,7 @@ class QueryBuilder * * @param \Doctrine\Common\Collections\ArrayCollection|array $parameters The query parameters to set. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function setParameters($parameters) { @@ -629,7 +629,7 @@ class QueryBuilder * * @param integer $firstResult The first result to return. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function setFirstResult($firstResult) { @@ -654,7 +654,7 @@ class QueryBuilder * * @param integer $maxResults The maximum number of results to retrieve. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function setMaxResults($maxResults) { @@ -684,7 +684,7 @@ class QueryBuilder * @param object|array $dqlPart An Expr object. * @param bool $append Whether to append (true) or replace (false). * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function add($dqlPartName, $dqlPart, $append = false) { @@ -747,7 +747,7 @@ class QueryBuilder * * @param mixed $select The selection expressions. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function select($select = null) { @@ -774,7 +774,7 @@ class QueryBuilder * * @param bool $flag * - * @return QueryBuilder + * @return $this */ public function distinct($flag = true) { @@ -796,7 +796,7 @@ class QueryBuilder * * @param mixed $select The selection expression. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function addSelect($select = null) { @@ -825,7 +825,7 @@ class QueryBuilder * @param string $delete The class/type whose instances are subject to the deletion. * @param string $alias The class/type alias used in the constructed query. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function delete($delete = null, $alias = null) { @@ -852,7 +852,7 @@ class QueryBuilder * @param string $update The class/type whose instances are subject to the update. * @param string $alias The class/type alias used in the constructed query. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function update($update = null, $alias = null) { @@ -879,7 +879,7 @@ class QueryBuilder * @param string $alias The alias of the class. * @param string $indexBy The index for the from. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function from($from, $alias, $indexBy = null) { @@ -905,7 +905,7 @@ class QueryBuilder * @param string $alias The root alias of the class. * @param string $indexBy The index for the from. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. * * @throws Query\QueryException */ @@ -951,7 +951,7 @@ class QueryBuilder * @param string|null $condition The condition for the join. * @param string|null $indexBy The index for the join. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function join($join, $alias, $conditionType = null, $condition = null, $indexBy = null) { @@ -977,7 +977,7 @@ class QueryBuilder * @param string|null $condition The condition for the join. * @param string|null $indexBy The index for the join. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) { @@ -1012,7 +1012,7 @@ class QueryBuilder * @param string|null $condition The condition for the join. * @param string|null $indexBy The index for the join. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) { @@ -1040,7 +1040,7 @@ class QueryBuilder * @param string $key The key/field to set. * @param string $value The value, expression, placeholder, etc. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function set($key, $value) { @@ -1071,7 +1071,7 @@ class QueryBuilder * * @param mixed $predicates The restriction predicates. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function where($predicates) { @@ -1096,7 +1096,7 @@ class QueryBuilder * * @param mixed $where The query restrictions. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. * * @see where() */ @@ -1129,7 +1129,7 @@ class QueryBuilder * * @param mixed $where The WHERE statement. * - * @return QueryBuilder + * @return $this * * @see where() */ @@ -1161,7 +1161,7 @@ class QueryBuilder * * @param string $groupBy The grouping expression. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function groupBy($groupBy) { @@ -1181,7 +1181,7 @@ class QueryBuilder * * @param string $groupBy The grouping expression. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function addGroupBy($groupBy) { @@ -1194,7 +1194,7 @@ class QueryBuilder * * @param mixed $having The restriction over the groups. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function having($having) { @@ -1211,7 +1211,7 @@ class QueryBuilder * * @param mixed $having The restriction to append. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function andHaving($having) { @@ -1234,7 +1234,7 @@ class QueryBuilder * * @param mixed $having The restriction to add. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function orHaving($having) { @@ -1258,7 +1258,7 @@ class QueryBuilder * @param string|Expr\OrderBy $sort The ordering expression. * @param string $order The ordering direction. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function orderBy($sort, $order = null) { @@ -1273,7 +1273,7 @@ class QueryBuilder * @param string|Expr\OrderBy $sort The ordering expression. * @param string $order The ordering direction. * - * @return QueryBuilder This QueryBuilder instance. + * @return $this This QueryBuilder instance. */ public function addOrderBy($sort, $order = null) { @@ -1290,7 +1290,7 @@ class QueryBuilder * Overrides firstResult and maxResults if they're set. * * @param Criteria $criteria - * @return QueryBuilder + * @return $this * @throws Query\QueryException */ public function addCriteria(Criteria $criteria) @@ -1451,7 +1451,7 @@ class QueryBuilder * * @param array|null $parts * - * @return QueryBuilder + * @return $this */ public function resetDQLParts($parts = null) { @@ -1471,7 +1471,7 @@ class QueryBuilder * * @param string $part * - * @return QueryBuilder + * @return $this */ public function resetDQLPart($part) { From 5687347d608654a5089735c1289c057c355b34ad Mon Sep 17 00:00:00 2001 From: Damien Gavard Date: Sun, 6 Sep 2015 21:45:51 +0200 Subject: [PATCH 3/5] Fix invalid return type documentation --- lib/Doctrine/ORM/AbstractQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index 9612a0c58..0e38daed0 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -215,7 +215,7 @@ abstract class AbstractQuery /** * Obtain the name of the second level query cache region in which query results will be stored * - * @return The cache region name; NULL indicates the default region. + * @return string|null The cache region name; NULL indicates the default region. */ public function getCacheRegion() { @@ -398,7 +398,7 @@ abstract class AbstractQuery * * @param mixed $value * - * @return array + * @return array|string * * @throws \Doctrine\ORM\ORMInvalidArgumentException */ From 9b4dadade04e840ccf0e8b51cef83b52f5b644d2 Mon Sep 17 00:00:00 2001 From: Damien Gavard Date: Sun, 6 Sep 2015 21:46:56 +0200 Subject: [PATCH 4/5] Use @return $this instead of @return static for consistency --- lib/Doctrine/ORM/AbstractQuery.php | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index 0e38daed0..5976eba1b 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -183,7 +183,7 @@ abstract class AbstractQuery * * @param boolean $cacheable * - * @return static This query instance. + * @return $this This query instance. */ public function setCacheable($cacheable) { @@ -203,7 +203,7 @@ abstract class AbstractQuery /** * @param string $cacheRegion * - * @return static This query instance. + * @return $this This query instance. */ public function setCacheRegion($cacheRegion) { @@ -243,7 +243,7 @@ abstract class AbstractQuery * * @param integer $lifetime * - * @return static This query instance. + * @return $this This query instance. */ public function setLifetime($lifetime) { @@ -263,7 +263,7 @@ abstract class AbstractQuery /** * @param integer $cacheMode * - * @return static This query instance. + * @return $this This query instance. */ public function setCacheMode($cacheMode) { @@ -340,7 +340,7 @@ abstract class AbstractQuery * * @param \Doctrine\Common\Collections\ArrayCollection|array $parameters * - * @return static This query instance. + * @return $this This query instance. */ public function setParameters($parameters) { @@ -369,7 +369,7 @@ abstract class AbstractQuery * the type conversion of this type. This is usually not needed for * strings and numeric types. * - * @return static This query instance. + * @return $this This query instance. */ public function setParameter($key, $value, $type = null) { @@ -441,7 +441,7 @@ abstract class AbstractQuery * * @param \Doctrine\ORM\Query\ResultSetMapping $rsm * - * @return static This query instance. + * @return $this This query instance. */ public function setResultSetMapping(Query\ResultSetMapping $rsm) { @@ -498,7 +498,7 @@ abstract class AbstractQuery * * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile * - * @return static This query instance. + * @return $this This query instance. */ public function setHydrationCacheProfile(QueryCacheProfile $profile = null) { @@ -528,7 +528,7 @@ abstract class AbstractQuery * * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile * - * @return static This query instance. + * @return $this This query instance. */ public function setResultCacheProfile(QueryCacheProfile $profile = null) { @@ -547,7 +547,7 @@ abstract class AbstractQuery * * @param \Doctrine\Common\Cache\Cache|null $resultCacheDriver Cache driver * - * @return static This query instance. + * @return $this This query instance. * * @throws ORMException */ @@ -588,7 +588,7 @@ abstract class AbstractQuery * @param integer $lifetime * @param string $resultCacheId * - * @return static This query instance. + * @return $this This query instance. */ public function useResultCache($bool, $lifetime = null, $resultCacheId = null) { @@ -609,7 +609,7 @@ abstract class AbstractQuery * * @param integer $lifetime How long the cache entry is valid. * - * @return static This query instance. + * @return $this This query instance. */ public function setResultCacheLifetime($lifetime) { @@ -639,7 +639,7 @@ abstract class AbstractQuery * * @param boolean $expire Whether or not to force resultset cache expiration. * - * @return static This query instance. + * @return $this This query instance. */ public function expireResultCache($expire = true) { @@ -675,7 +675,7 @@ abstract class AbstractQuery * @param string $assocName * @param int $fetchMode * - * @return static This query instance. + * @return $this This query instance. */ public function setFetchMode($class, $assocName, $fetchMode) { @@ -694,7 +694,7 @@ abstract class AbstractQuery * @param integer $hydrationMode Doctrine processing mode to be used during hydration process. * One of the Query::HYDRATE_* constants. * - * @return static This query instance. + * @return $this This query instance. */ public function setHydrationMode($hydrationMode) { @@ -839,7 +839,7 @@ abstract class AbstractQuery * @param string $name The name of the hint. * @param mixed $value The value of the hint. * - * @return static This query instance. + * @return $this This query instance. */ public function setHint($name, $value) { @@ -1051,7 +1051,7 @@ abstract class AbstractQuery * * @param string $id * - * @return static This query instance. + * @return $this This query instance. */ public function setResultCacheId($id) { From 00718f6bf752e0ff2e70f607b0ec2064a4371fe1 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 11 Dec 2015 18:27:19 +0100 Subject: [PATCH 5/5] #1496 s/$this/self --- lib/Doctrine/ORM/AbstractQuery.php | 34 +++++++-------- lib/Doctrine/ORM/QueryBuilder.php | 68 +++++++++++++++--------------- 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index 5976eba1b..0e38daed0 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -183,7 +183,7 @@ abstract class AbstractQuery * * @param boolean $cacheable * - * @return $this This query instance. + * @return static This query instance. */ public function setCacheable($cacheable) { @@ -203,7 +203,7 @@ abstract class AbstractQuery /** * @param string $cacheRegion * - * @return $this This query instance. + * @return static This query instance. */ public function setCacheRegion($cacheRegion) { @@ -243,7 +243,7 @@ abstract class AbstractQuery * * @param integer $lifetime * - * @return $this This query instance. + * @return static This query instance. */ public function setLifetime($lifetime) { @@ -263,7 +263,7 @@ abstract class AbstractQuery /** * @param integer $cacheMode * - * @return $this This query instance. + * @return static This query instance. */ public function setCacheMode($cacheMode) { @@ -340,7 +340,7 @@ abstract class AbstractQuery * * @param \Doctrine\Common\Collections\ArrayCollection|array $parameters * - * @return $this This query instance. + * @return static This query instance. */ public function setParameters($parameters) { @@ -369,7 +369,7 @@ abstract class AbstractQuery * the type conversion of this type. This is usually not needed for * strings and numeric types. * - * @return $this This query instance. + * @return static This query instance. */ public function setParameter($key, $value, $type = null) { @@ -441,7 +441,7 @@ abstract class AbstractQuery * * @param \Doctrine\ORM\Query\ResultSetMapping $rsm * - * @return $this This query instance. + * @return static This query instance. */ public function setResultSetMapping(Query\ResultSetMapping $rsm) { @@ -498,7 +498,7 @@ abstract class AbstractQuery * * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile * - * @return $this This query instance. + * @return static This query instance. */ public function setHydrationCacheProfile(QueryCacheProfile $profile = null) { @@ -528,7 +528,7 @@ abstract class AbstractQuery * * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile * - * @return $this This query instance. + * @return static This query instance. */ public function setResultCacheProfile(QueryCacheProfile $profile = null) { @@ -547,7 +547,7 @@ abstract class AbstractQuery * * @param \Doctrine\Common\Cache\Cache|null $resultCacheDriver Cache driver * - * @return $this This query instance. + * @return static This query instance. * * @throws ORMException */ @@ -588,7 +588,7 @@ abstract class AbstractQuery * @param integer $lifetime * @param string $resultCacheId * - * @return $this This query instance. + * @return static This query instance. */ public function useResultCache($bool, $lifetime = null, $resultCacheId = null) { @@ -609,7 +609,7 @@ abstract class AbstractQuery * * @param integer $lifetime How long the cache entry is valid. * - * @return $this This query instance. + * @return static This query instance. */ public function setResultCacheLifetime($lifetime) { @@ -639,7 +639,7 @@ abstract class AbstractQuery * * @param boolean $expire Whether or not to force resultset cache expiration. * - * @return $this This query instance. + * @return static This query instance. */ public function expireResultCache($expire = true) { @@ -675,7 +675,7 @@ abstract class AbstractQuery * @param string $assocName * @param int $fetchMode * - * @return $this This query instance. + * @return static This query instance. */ public function setFetchMode($class, $assocName, $fetchMode) { @@ -694,7 +694,7 @@ abstract class AbstractQuery * @param integer $hydrationMode Doctrine processing mode to be used during hydration process. * One of the Query::HYDRATE_* constants. * - * @return $this This query instance. + * @return static This query instance. */ public function setHydrationMode($hydrationMode) { @@ -839,7 +839,7 @@ abstract class AbstractQuery * @param string $name The name of the hint. * @param mixed $value The value of the hint. * - * @return $this This query instance. + * @return static This query instance. */ public function setHint($name, $value) { @@ -1051,7 +1051,7 @@ abstract class AbstractQuery * * @param string $id * - * @return $this This query instance. + * @return static This query instance. */ public function setResultCacheId($id) { diff --git a/lib/Doctrine/ORM/QueryBuilder.php b/lib/Doctrine/ORM/QueryBuilder.php index aecc6b2ca..2dfbf800e 100644 --- a/lib/Doctrine/ORM/QueryBuilder.php +++ b/lib/Doctrine/ORM/QueryBuilder.php @@ -183,7 +183,7 @@ class QueryBuilder * * @param boolean $cacheable * - * @return $this + * @return self */ public function setCacheable($cacheable) { @@ -203,7 +203,7 @@ class QueryBuilder /** * @param string $cacheRegion * - * @return $this + * @return self */ public function setCacheRegion($cacheRegion) { @@ -235,7 +235,7 @@ class QueryBuilder * * @param integer $lifetime * - * @return $this + * @return self */ public function setLifetime($lifetime) { @@ -255,7 +255,7 @@ class QueryBuilder /** * @param integer $cacheMode * - * @return $this + * @return self */ public function setCacheMode($cacheMode) { @@ -527,7 +527,7 @@ class QueryBuilder * @param mixed $value The parameter value. * @param string|null $type PDO::PARAM_* or \Doctrine\DBAL\Types\Type::* constant * - * @return $this This QueryBuilder instance. + * @return self */ public function setParameter($key, $value, $type = null) { @@ -571,7 +571,7 @@ class QueryBuilder * * @param \Doctrine\Common\Collections\ArrayCollection|array $parameters The query parameters to set. * - * @return $this This QueryBuilder instance. + * @return self */ public function setParameters($parameters) { @@ -629,7 +629,7 @@ class QueryBuilder * * @param integer $firstResult The first result to return. * - * @return $this This QueryBuilder instance. + * @return self */ public function setFirstResult($firstResult) { @@ -654,7 +654,7 @@ class QueryBuilder * * @param integer $maxResults The maximum number of results to retrieve. * - * @return $this This QueryBuilder instance. + * @return self */ public function setMaxResults($maxResults) { @@ -684,7 +684,7 @@ class QueryBuilder * @param object|array $dqlPart An Expr object. * @param bool $append Whether to append (true) or replace (false). * - * @return $this This QueryBuilder instance. + * @return self */ public function add($dqlPartName, $dqlPart, $append = false) { @@ -747,7 +747,7 @@ class QueryBuilder * * @param mixed $select The selection expressions. * - * @return $this This QueryBuilder instance. + * @return self */ public function select($select = null) { @@ -774,7 +774,7 @@ class QueryBuilder * * @param bool $flag * - * @return $this + * @return self */ public function distinct($flag = true) { @@ -796,7 +796,7 @@ class QueryBuilder * * @param mixed $select The selection expression. * - * @return $this This QueryBuilder instance. + * @return self */ public function addSelect($select = null) { @@ -825,7 +825,7 @@ class QueryBuilder * @param string $delete The class/type whose instances are subject to the deletion. * @param string $alias The class/type alias used in the constructed query. * - * @return $this This QueryBuilder instance. + * @return self */ public function delete($delete = null, $alias = null) { @@ -852,7 +852,7 @@ class QueryBuilder * @param string $update The class/type whose instances are subject to the update. * @param string $alias The class/type alias used in the constructed query. * - * @return $this This QueryBuilder instance. + * @return self */ public function update($update = null, $alias = null) { @@ -879,7 +879,7 @@ class QueryBuilder * @param string $alias The alias of the class. * @param string $indexBy The index for the from. * - * @return $this This QueryBuilder instance. + * @return self */ public function from($from, $alias, $indexBy = null) { @@ -905,7 +905,7 @@ class QueryBuilder * @param string $alias The root alias of the class. * @param string $indexBy The index for the from. * - * @return $this This QueryBuilder instance. + * @return self * * @throws Query\QueryException */ @@ -951,7 +951,7 @@ class QueryBuilder * @param string|null $condition The condition for the join. * @param string|null $indexBy The index for the join. * - * @return $this This QueryBuilder instance. + * @return self */ public function join($join, $alias, $conditionType = null, $condition = null, $indexBy = null) { @@ -977,7 +977,7 @@ class QueryBuilder * @param string|null $condition The condition for the join. * @param string|null $indexBy The index for the join. * - * @return $this This QueryBuilder instance. + * @return self */ public function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) { @@ -1012,7 +1012,7 @@ class QueryBuilder * @param string|null $condition The condition for the join. * @param string|null $indexBy The index for the join. * - * @return $this This QueryBuilder instance. + * @return self */ public function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) { @@ -1040,7 +1040,7 @@ class QueryBuilder * @param string $key The key/field to set. * @param string $value The value, expression, placeholder, etc. * - * @return $this This QueryBuilder instance. + * @return self */ public function set($key, $value) { @@ -1071,7 +1071,7 @@ class QueryBuilder * * @param mixed $predicates The restriction predicates. * - * @return $this This QueryBuilder instance. + * @return self */ public function where($predicates) { @@ -1096,7 +1096,7 @@ class QueryBuilder * * @param mixed $where The query restrictions. * - * @return $this This QueryBuilder instance. + * @return self * * @see where() */ @@ -1129,7 +1129,7 @@ class QueryBuilder * * @param mixed $where The WHERE statement. * - * @return $this + * @return self * * @see where() */ @@ -1161,7 +1161,7 @@ class QueryBuilder * * @param string $groupBy The grouping expression. * - * @return $this This QueryBuilder instance. + * @return self */ public function groupBy($groupBy) { @@ -1181,7 +1181,7 @@ class QueryBuilder * * @param string $groupBy The grouping expression. * - * @return $this This QueryBuilder instance. + * @return self */ public function addGroupBy($groupBy) { @@ -1194,7 +1194,7 @@ class QueryBuilder * * @param mixed $having The restriction over the groups. * - * @return $this This QueryBuilder instance. + * @return self */ public function having($having) { @@ -1211,7 +1211,7 @@ class QueryBuilder * * @param mixed $having The restriction to append. * - * @return $this This QueryBuilder instance. + * @return self */ public function andHaving($having) { @@ -1234,7 +1234,7 @@ class QueryBuilder * * @param mixed $having The restriction to add. * - * @return $this This QueryBuilder instance. + * @return self */ public function orHaving($having) { @@ -1258,7 +1258,7 @@ class QueryBuilder * @param string|Expr\OrderBy $sort The ordering expression. * @param string $order The ordering direction. * - * @return $this This QueryBuilder instance. + * @return self */ public function orderBy($sort, $order = null) { @@ -1273,7 +1273,7 @@ class QueryBuilder * @param string|Expr\OrderBy $sort The ordering expression. * @param string $order The ordering direction. * - * @return $this This QueryBuilder instance. + * @return self */ public function addOrderBy($sort, $order = null) { @@ -1290,7 +1290,9 @@ class QueryBuilder * Overrides firstResult and maxResults if they're set. * * @param Criteria $criteria - * @return $this + * + * @return self + * * @throws Query\QueryException */ public function addCriteria(Criteria $criteria) @@ -1451,7 +1453,7 @@ class QueryBuilder * * @param array|null $parts * - * @return $this + * @return self */ public function resetDQLParts($parts = null) { @@ -1471,7 +1473,7 @@ class QueryBuilder * * @param string $part * - * @return $this + * @return self */ public function resetDQLPart($part) {