diff --git a/src/Query/Sql/Base.php b/src/Query/Sql/Base.php index a24b7ce..40f5d66 100644 --- a/src/Query/Sql/Base.php +++ b/src/Query/Sql/Base.php @@ -53,7 +53,7 @@ protected function inheritFromParent(BaseQuery $parent) * $h->table('db_mydatabase.posts') * * @param string|\Closure $table - * @return self + * @return static */ public function table($table, $alias = null) { diff --git a/src/Query/Sql/Insert.php b/src/Query/Sql/Insert.php index c9e00aa..15dd600 100644 --- a/src/Query/Sql/Insert.php +++ b/src/Query/Sql/Insert.php @@ -31,7 +31,7 @@ class Insert extends Base * ->ignore(true) * * @param bool $ignore - * @return self The current query builder. + * @return static The current query builder. */ public function ignore($ignore = true) { @@ -50,7 +50,7 @@ public function ignore($ignore = true) * ]) * * @param array $values The data you want to insert. - * @return self The current query builder. + * @return static The current query builder. */ public function values(array $values = array()) { @@ -84,7 +84,7 @@ public function values(array $values = array()) /** * Resets the current insert values of the query. * - * @return self The current query builder. + * @return static The current query builder. */ public function resetValues() { diff --git a/src/Query/Sql/Select.php b/src/Query/Sql/Select.php index c677062..de1e057 100644 --- a/src/Query/Sql/Select.php +++ b/src/Query/Sql/Select.php @@ -99,7 +99,7 @@ public function copyTo(Select $query) * Distinct select setter * * @param bool $distinct - * @return self The current query builder. + * @return static The current query builder. */ public function distinct($distinct = true) { @@ -116,7 +116,7 @@ public function distinct($distinct = true) * ->fields('id, name, created_at as created') * * @param string|array|object $fields The fields that should be selected. - * @return self The current query builder. + * @return static The current query builder. */ public function fields($fields) { @@ -159,7 +159,7 @@ public function fields($fields) * * @param string|object $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addField($field, $alias = null) { @@ -173,7 +173,7 @@ public function addField($field, $alias = null) * * @param string $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addFieldCount($field, $alias = null) { @@ -187,7 +187,7 @@ public function addFieldCount($field, $alias = null) * * @param string $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addFieldMax($field, $alias = null) { @@ -201,7 +201,7 @@ public function addFieldMax($field, $alias = null) * * @param string $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addFieldMin($field, $alias = null) { @@ -215,7 +215,7 @@ public function addFieldMin($field, $alias = null) * * @param string $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addFieldSum($field, $alias = null) { @@ -229,7 +229,7 @@ public function addFieldSum($field, $alias = null) * * @param string $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addFieldAvg($field, $alias = null) { @@ -243,7 +243,7 @@ public function addFieldAvg($field, $alias = null) * * @param string $field * @param string $alias - * @return self The current query builder. + * @return static The current query builder. */ public function addFieldRound($field, $decimals = 0, $alias = null) { @@ -264,7 +264,7 @@ public function addFieldRound($field, $decimals = 0, $alias = null) * * @param array|string|Expression $columns The column or colums to order by. * @param string $direction The sort direction (asc, desc...). - * @return self The current query builder. + * @return static The current query builder. */ public function orderBy($columns, $direction = 'asc') { @@ -302,7 +302,7 @@ public function orderBy($columns, $direction = 'asc') * ->gorupBy(['category', 'price']) * * @param array|string $groupKeys The keys on which the data should be grouped on. - * @return self The current query builder. + * @return static The current query builder. */ public function groupBy($groupKeys) { @@ -330,7 +330,7 @@ public function groupBy($groupKeys) * @param string $referenceKey * @param string $type The join type (inner, left, right, outer) * - * @return self The current query builder. + * @return static The current query builder. */ public function join($table, $localKey, $operator = null, $referenceKey = null, $type = 'left') { @@ -365,7 +365,7 @@ public function join($table, $localKey, $operator = null, $referenceKey = null, * @param string $operator The operator (=, !=, <, > etc.) * @param string $referenceKey * - * @return self The current query builder. + * @return static The current query builder. */ public function leftJoin($table, $localKey, $operator = null, $referenceKey = null) { @@ -380,7 +380,7 @@ public function leftJoin($table, $localKey, $operator = null, $referenceKey = nu * @param string $operator The operator (=, !=, <, > etc.) * @param string $referenceKey * - * @return self The current query builder. + * @return static The current query builder. */ public function rightJoin($table, $localKey, $operator = null, $referenceKey = null) { @@ -395,7 +395,7 @@ public function rightJoin($table, $localKey, $operator = null, $referenceKey = n * @param string $operator The operator (=, !=, <, > etc.) * @param string $referenceKey * - * @return self The current query builder. + * @return static The current query builder. */ public function innerJoin($table, $localKey, $operator = null, $referenceKey = null) { @@ -410,7 +410,7 @@ public function innerJoin($table, $localKey, $operator = null, $referenceKey = n * @param string $operator The operator (=, !=, <, > etc.) * @param string $referenceKey * - * @return self The current query builder. + * @return static The current query builder. */ public function outerJoin($table, $localKey, $operator = null, $referenceKey = null) { @@ -421,7 +421,7 @@ public function outerJoin($table, $localKey, $operator = null, $referenceKey = n * Forward a result value as array key * * @param string|bool $key - * @return self The current query builder. + * @return static The current query builder. */ public function forwardKey($key = true) { @@ -453,7 +453,7 @@ public function forwardKey($key = true) * ), * * @param string|bool $key - * @return self The current query builder. + * @return static The current query builder. */ public function groupResults($key) { diff --git a/src/Query/Sql/SelectBase.php b/src/Query/Sql/SelectBase.php index 3224d2e..03ff1dc 100644 --- a/src/Query/Sql/SelectBase.php +++ b/src/Query/Sql/SelectBase.php @@ -54,7 +54,7 @@ protected function stringArgumentToArray($argument) /** * Will reset the current selects where conditions * - * @return self The current query builder. + * @return static The current query builder. */ public function resetWheres() { @@ -64,7 +64,7 @@ public function resetWheres() /** * Will reset the current selects limit * - * @return self The current query builder. + * @return static The current query builder. */ public function resetLimit() { @@ -74,7 +74,7 @@ public function resetLimit() /** * Will reset the current selects offset * - * @return self The current query builder. + * @return static The current query builder. */ public function resetOffset() { @@ -93,7 +93,7 @@ public function resetOffset() * @param mixed $param2 The value if $param1 is an opartor. * @param string $type the where type ( and, or ) * - * @return self The current query builder. + * @return static The current query builder. */ public function where($column, $param1 = null, $param2 = null, $type = 'and') { @@ -169,7 +169,7 @@ public function where($column, $param1 = null, $param2 = null, $type = 'and') * @param mixed $param1 * @param mixed $param2 * - * @return self The current query builder. + * @return static The current query builder. */ public function orWhere($column, $param1 = null, $param2 = null) { @@ -185,7 +185,7 @@ public function orWhere($column, $param1 = null, $param2 = null) * @param mixed $param1 * @param mixed $param2 * - * @return self The current query builder. + * @return static The current query builder. */ public function andWhere($column, $param1 = null, $param2 = null) { @@ -199,7 +199,7 @@ public function andWhere($column, $param1 = null, $param2 = null) * * @param string $column * @param array $options - * @return self The current query builder. + * @return static The current query builder. */ public function whereIn($column, array $options = array()) { @@ -219,7 +219,7 @@ public function whereIn($column, array $options = array()) * * @param string $column * @param array $options - * @return self The current query builder. + * @return static The current query builder. */ public function whereNotIn($column, array $options = array()) { @@ -238,7 +238,7 @@ public function whereNotIn($column, array $options = array()) * ->whereNull('modified_at') * * @param string $column - * @return self The current query builder. + * @return static The current query builder. */ public function whereNull($column) { @@ -251,7 +251,7 @@ public function whereNull($column) * ->whereNotNull('created_at') * * @param string $column - * @return self The current query builder. + * @return static The current query builder. */ public function whereNotNull($column) { @@ -264,7 +264,7 @@ public function whereNotNull($column) * ->orWhereNull('modified_at') * * @param string $column - * @return self The current query builder. + * @return static The current query builder. */ public function orWhereNull($column) { @@ -277,7 +277,7 @@ public function orWhereNull($column) * ->orWhereNotNull('modified_at') * * @param string $column - * @return self The current query builder. + * @return static The current query builder. */ public function orWhereNotNull($column) { @@ -295,7 +295,7 @@ public function orWhereNotNull($column) * * @param int $limit * @param int $limit2 - * @return self The current query builder. + * @return static The current query builder. */ public function limit($limit, $limit2 = null) { @@ -314,7 +314,7 @@ public function limit($limit, $limit2 = null) * Set the queries current offset * * @param int $offset - * @return self The current query builder. + * @return static The current query builder. */ public function offset($offset) { @@ -326,7 +326,7 @@ public function offset($offset) * * @param int $page * @param int $size - * @return self The current query builder. + * @return static The current query builder. */ public function page($page, $size = 25) { diff --git a/src/Query/Sql/SelectJoin.php b/src/Query/Sql/SelectJoin.php index 09b8e70..54662cc 100644 --- a/src/Query/Sql/SelectJoin.php +++ b/src/Query/Sql/SelectJoin.php @@ -34,7 +34,7 @@ class SelectJoin extends SelectBase * @param string $operator * @param string $referenceKey * - * @return self + * @return static */ public function on($localKey, $operator, $referenceKey, $type = 'and') { @@ -48,7 +48,7 @@ public function on($localKey, $operator, $referenceKey, $type = 'and') * @param string $operator * @param string $referenceKey * - * @return self + * @return static */ public function orOn($localKey, $operator, $referenceKey) { @@ -62,7 +62,7 @@ public function orOn($localKey, $operator, $referenceKey) * @param string $operator * @param string $referenceKey * - * @return self + * @return static */ public function andOn($localKey, $operator, $referenceKey) { diff --git a/src/Query/Sql/Update.php b/src/Query/Sql/Update.php index ec0afe6..9179ecd 100644 --- a/src/Query/Sql/Update.php +++ b/src/Query/Sql/Update.php @@ -23,7 +23,7 @@ class Update extends SelectBase * * @param string|array $param1 * @param mixed $param2 - * @return self + * @return static */ public function set($param1, $param2 = null) {