From 121734c3472685691d5cea04b14210496ae52440 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Wed, 19 Jun 2019 21:43:51 +0200 Subject: [PATCH] Type hint against IResultWrapper in api classes Change-Id: If3870e6b8d343dd12390f5155d97edbbe080ac77 --- includes/api/ApiPageSet.php | 6 +++--- includes/api/ApiQueryBase.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 64c6f45971..6b24b6347a 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -20,7 +20,7 @@ * @file */ use MediaWiki\MediaWikiServices; -use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; /** @@ -735,7 +735,7 @@ class ApiPageSet extends ApiBase { * $this->getPageTableFields(). * * @param IDatabase $db - * @param ResultWrapper $queryResult + * @param IResultWrapper $queryResult */ public function populateFromQueryResult( $db, $queryResult ) { $this->initFromQueryResult( $queryResult ); @@ -854,7 +854,7 @@ class ApiPageSet extends ApiBase { /** * Iterate through the result of the query on 'page' table, * and for each row create and store title object and save any extra fields requested. - * @param ResultWrapper $res DB Query result + * @param IResultWrapper $res DB Query result * @param array $remaining Array of either pageID or ns/title elements (optional). * If given, any missing items will go to $mMissingPageIDs and $mMissingTitles * @param bool $processTitles Must be provided together with $remaining. diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 59ec4f61ca..ec432d8f11 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -21,7 +21,7 @@ */ use Wikimedia\Rdbms\IDatabase; -use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IResultWrapper; /** * This is a base class for all Query modules. @@ -368,7 +368,7 @@ abstract class ApiQueryBase extends ApiBase { * @param array|null &$hookData If set, the ApiQueryBaseBeforeQuery and * ApiQueryBaseAfterQuery hooks will be called, and the * ApiQueryBaseProcessRow hook will be expected. - * @return ResultWrapper + * @return IResultWrapper */ protected function select( $method, $extraQuery = [], array &$hookData = null ) { $tables = array_merge( -- 2.20.1