1
0
mirror of synced 2025-02-09 08:49:26 +03:00

Use @return $this instead of return explicitly QueryBuilder

This commit is contained in:
Damien Gavard 2015-08-27 10:44:58 +02:00 committed by Marco Pivetta
parent 8d62aadf55
commit 15aafaa11d

View File

@ -183,7 +183,7 @@ class QueryBuilder
* *
* @param boolean $cacheable * @param boolean $cacheable
* *
* @return QueryBuilder * @return $this
*/ */
public function setCacheable($cacheable) public function setCacheable($cacheable)
{ {
@ -203,7 +203,7 @@ class QueryBuilder
/** /**
* @param string $cacheRegion * @param string $cacheRegion
* *
* @return QueryBuilder * @return $this
*/ */
public function setCacheRegion($cacheRegion) public function setCacheRegion($cacheRegion)
{ {
@ -235,7 +235,7 @@ class QueryBuilder
* *
* @param integer $lifetime * @param integer $lifetime
* *
* @return QueryBuilder * @return $this
*/ */
public function setLifetime($lifetime) public function setLifetime($lifetime)
{ {
@ -255,7 +255,7 @@ class QueryBuilder
/** /**
* @param integer $cacheMode * @param integer $cacheMode
* *
* @return QueryBuilder * @return $this
*/ */
public function setCacheMode($cacheMode) public function setCacheMode($cacheMode)
{ {
@ -527,7 +527,7 @@ class QueryBuilder
* @param mixed $value The parameter value. * @param mixed $value The parameter value.
* @param string|null $type PDO::PARAM_* or \Doctrine\DBAL\Types\Type::* constant * @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) 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. * @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) public function setParameters($parameters)
{ {
@ -629,7 +629,7 @@ class QueryBuilder
* *
* @param integer $firstResult The first result to return. * @param integer $firstResult The first result to return.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function setFirstResult($firstResult) public function setFirstResult($firstResult)
{ {
@ -654,7 +654,7 @@ class QueryBuilder
* *
* @param integer $maxResults The maximum number of results to retrieve. * @param integer $maxResults The maximum number of results to retrieve.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function setMaxResults($maxResults) public function setMaxResults($maxResults)
{ {
@ -684,7 +684,7 @@ class QueryBuilder
* @param object|array $dqlPart An Expr object. * @param object|array $dqlPart An Expr object.
* @param bool $append Whether to append (true) or replace (false). * @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) public function add($dqlPartName, $dqlPart, $append = false)
{ {
@ -747,7 +747,7 @@ class QueryBuilder
* *
* @param mixed $select The selection expressions. * @param mixed $select The selection expressions.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function select($select = null) public function select($select = null)
{ {
@ -774,7 +774,7 @@ class QueryBuilder
* *
* @param bool $flag * @param bool $flag
* *
* @return QueryBuilder * @return $this
*/ */
public function distinct($flag = true) public function distinct($flag = true)
{ {
@ -796,7 +796,7 @@ class QueryBuilder
* *
* @param mixed $select The selection expression. * @param mixed $select The selection expression.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function addSelect($select = null) 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 $delete The class/type whose instances are subject to the deletion.
* @param string $alias The class/type alias used in the constructed query. * @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) 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 $update The class/type whose instances are subject to the update.
* @param string $alias The class/type alias used in the constructed query. * @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) public function update($update = null, $alias = null)
{ {
@ -879,7 +879,7 @@ class QueryBuilder
* @param string $alias The alias of the class. * @param string $alias The alias of the class.
* @param string $indexBy The index for the from. * @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) public function from($from, $alias, $indexBy = null)
{ {
@ -905,7 +905,7 @@ class QueryBuilder
* @param string $alias The root alias of the class. * @param string $alias The root alias of the class.
* @param string $indexBy The index for the from. * @param string $indexBy The index for the from.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
* *
* @throws Query\QueryException * @throws Query\QueryException
*/ */
@ -951,7 +951,7 @@ class QueryBuilder
* @param string|null $condition The condition for the join. * @param string|null $condition The condition for the join.
* @param string|null $indexBy The index 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) 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 $condition The condition for the join.
* @param string|null $indexBy The index 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) 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 $condition The condition for the join.
* @param string|null $indexBy The index 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) 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 $key The key/field to set.
* @param string $value The value, expression, placeholder, etc. * @param string $value The value, expression, placeholder, etc.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function set($key, $value) public function set($key, $value)
{ {
@ -1071,7 +1071,7 @@ class QueryBuilder
* *
* @param mixed $predicates The restriction predicates. * @param mixed $predicates The restriction predicates.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function where($predicates) public function where($predicates)
{ {
@ -1096,7 +1096,7 @@ class QueryBuilder
* *
* @param mixed $where The query restrictions. * @param mixed $where The query restrictions.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
* *
* @see where() * @see where()
*/ */
@ -1129,7 +1129,7 @@ class QueryBuilder
* *
* @param mixed $where The WHERE statement. * @param mixed $where The WHERE statement.
* *
* @return QueryBuilder * @return $this
* *
* @see where() * @see where()
*/ */
@ -1161,7 +1161,7 @@ class QueryBuilder
* *
* @param string $groupBy The grouping expression. * @param string $groupBy The grouping expression.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function groupBy($groupBy) public function groupBy($groupBy)
{ {
@ -1181,7 +1181,7 @@ class QueryBuilder
* *
* @param string $groupBy The grouping expression. * @param string $groupBy The grouping expression.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function addGroupBy($groupBy) public function addGroupBy($groupBy)
{ {
@ -1194,7 +1194,7 @@ class QueryBuilder
* *
* @param mixed $having The restriction over the groups. * @param mixed $having The restriction over the groups.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function having($having) public function having($having)
{ {
@ -1211,7 +1211,7 @@ class QueryBuilder
* *
* @param mixed $having The restriction to append. * @param mixed $having The restriction to append.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function andHaving($having) public function andHaving($having)
{ {
@ -1234,7 +1234,7 @@ class QueryBuilder
* *
* @param mixed $having The restriction to add. * @param mixed $having The restriction to add.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function orHaving($having) public function orHaving($having)
{ {
@ -1258,7 +1258,7 @@ class QueryBuilder
* @param string|Expr\OrderBy $sort The ordering expression. * @param string|Expr\OrderBy $sort The ordering expression.
* @param string $order The ordering direction. * @param string $order The ordering direction.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function orderBy($sort, $order = null) public function orderBy($sort, $order = null)
{ {
@ -1273,7 +1273,7 @@ class QueryBuilder
* @param string|Expr\OrderBy $sort The ordering expression. * @param string|Expr\OrderBy $sort The ordering expression.
* @param string $order The ordering direction. * @param string $order The ordering direction.
* *
* @return QueryBuilder This QueryBuilder instance. * @return $this This QueryBuilder instance.
*/ */
public function addOrderBy($sort, $order = null) public function addOrderBy($sort, $order = null)
{ {
@ -1290,7 +1290,7 @@ class QueryBuilder
* Overrides firstResult and maxResults if they're set. * Overrides firstResult and maxResults if they're set.
* *
* @param Criteria $criteria * @param Criteria $criteria
* @return QueryBuilder * @return $this
* @throws Query\QueryException * @throws Query\QueryException
*/ */
public function addCriteria(Criteria $criteria) public function addCriteria(Criteria $criteria)
@ -1451,7 +1451,7 @@ class QueryBuilder
* *
* @param array|null $parts * @param array|null $parts
* *
* @return QueryBuilder * @return $this
*/ */
public function resetDQLParts($parts = null) public function resetDQLParts($parts = null)
{ {
@ -1471,7 +1471,7 @@ class QueryBuilder
* *
* @param string $part * @param string $part
* *
* @return QueryBuilder * @return $this
*/ */
public function resetDQLPart($part) public function resetDQLPart($part)
{ {