From a01c1e1a22d8cd22bdd3546ad3e68500815738da Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 12 Dec 2016 12:04:24 +0100 Subject: [PATCH] @return self -> static --- src/Database/DriverException.php | 2 +- src/Database/Table/GroupedSelection.php | 2 +- src/Database/Table/Selection.php | 26 ++++++++++++------------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Database/DriverException.php b/src/Database/DriverException.php index 6d8394353..7665df465 100644 --- a/src/Database/DriverException.php +++ b/src/Database/DriverException.php @@ -18,7 +18,7 @@ class DriverException extends \PDOException /** - * @return self + * @return static */ public static function from(\PDOException $src) { diff --git a/src/Database/Table/GroupedSelection.php b/src/Database/Table/GroupedSelection.php index ffe857e3c..ce778cbc4 100644 --- a/src/Database/Table/GroupedSelection.php +++ b/src/Database/Table/GroupedSelection.php @@ -52,7 +52,7 @@ public function __construct(Context $context, IConventions $conventions, $tableN * Sets active group. * @internal * @param int primary key of grouped rows - * @return self + * @return static */ public function setActive($active) { diff --git a/src/Database/Table/Selection.php b/src/Database/Table/Selection.php index 63b2513de..607837438 100644 --- a/src/Database/Table/Selection.php +++ b/src/Database/Table/Selection.php @@ -147,7 +147,7 @@ public function getPrimarySequence() /** * @param string - * @return self + * @return static */ public function setPrimarySequence($sequence) { @@ -274,7 +274,7 @@ public function fetchAssoc($path) /** * Adds select clause, more calls appends to the end. * @param string for example "column, MD5(column) AS column_md5" - * @return self + * @return static */ public function select($columns, ...$params) { @@ -287,7 +287,7 @@ public function select($columns, ...$params) /** * Adds condition for primary key. * @param mixed - * @return self + * @return static */ public function wherePrimary($key) { @@ -313,7 +313,7 @@ public function wherePrimary($key) * Adds where condition, more calls appends with AND. * @param string condition possibly containing ? * @param mixed - * @return self + * @return static */ public function where($condition, ...$params) { @@ -327,7 +327,7 @@ public function where($condition, ...$params) * @param string table chain or table alias for which you need additional left join condition * @param string condition possibly containing ? * @param mixed - * @return self + * @return static */ public function joinWhere($tableChain, $condition, ...$params) { @@ -364,7 +364,7 @@ protected function condition($condition, array $params, $tableChain = NULL) * Adds where condition using the OR operator between parameters. * More calls appends with AND. * @param array ['column1' => 1, 'column2 > ?' => 2, 'full condition'] - * @return self + * @return static * @throws \Nette\InvalidArgumentException */ public function whereOr(array $parameters) @@ -397,7 +397,7 @@ public function whereOr(array $parameters) /** * Adds order clause, more calls appends to the end. * @param string for example 'column1, column2 DESC' - * @return self + * @return static */ public function order($columns, ...$params) { @@ -411,7 +411,7 @@ public function order($columns, ...$params) * Sets limit clause, more calls rewrite old values. * @param int * @param int - * @return self + * @return static */ public function limit($limit, $offset = NULL) { @@ -425,7 +425,7 @@ public function limit($limit, $offset = NULL) * Sets offset using page number, more calls rewrite old values. * @param int * @param int - * @return self + * @return static */ public function page($page, $itemsPerPage, & $numOfPages = NULL) { @@ -442,7 +442,7 @@ public function page($page, $itemsPerPage, & $numOfPages = NULL) /** * Sets group clause, more calls rewrite old value. * @param string - * @return self + * @return static */ public function group($columns, ...$params) { @@ -455,7 +455,7 @@ public function group($columns, ...$params) /** * Sets having clause, more calls rewrite old value. * @param string - * @return self + * @return static */ public function having($having, ...$params) { @@ -469,7 +469,7 @@ public function having($having, ...$params) * Aliases table. Example ':book:book_tag.tag', 'tg' * @param string * @param string - * @return self + * @return static */ public function alias($tableChain, $alias) { @@ -656,7 +656,7 @@ protected function saveCacheState() /** * Returns Selection parent for caching. - * @return self + * @return static */ protected function getRefTable(& $refPath) {