From e6c509351539cc58288d21cb1cb3b9d5094bc151 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Thu, 6 Jun 2019 21:56:18 +0200 Subject: [PATCH] Use IResultWrapper in LinkBatch and BacklinkCache Change-Id: If96d6dfeea17e73073b78c19526787e788f7b412 --- includes/cache/BacklinkCache.php | 8 ++++---- includes/cache/LinkBatch.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php index 14072717d7..c2fb52afdc 100644 --- a/includes/cache/BacklinkCache.php +++ b/includes/cache/BacklinkCache.php @@ -25,9 +25,9 @@ * @copyright © 2011, Antoine Musso */ -use Wikimedia\Rdbms\ResultWrapper; use Wikimedia\Rdbms\FakeResultWrapper; use Wikimedia\Rdbms\IDatabase; +use Wikimedia\Rdbms\IResultWrapper; use MediaWiki\MediaWikiServices; /** @@ -67,7 +67,7 @@ class BacklinkCache { * * Initialized with BacklinkCache::getLinks() * Cleared with BacklinkCache::clear() - * @var ResultWrapper[] + * @var IResultWrapper[] */ protected $fullResultCache = []; @@ -179,7 +179,7 @@ class BacklinkCache { * @param int|bool $endId * @param int $max * @param string $select 'all' or 'ids' - * @return ResultWrapper + * @return IResultWrapper */ protected function queryLinks( $table, $startId, $endId, $max, $select = 'all' ) { $fromField = $this->getPrefix( $table ) . '_from'; @@ -472,7 +472,7 @@ class BacklinkCache { /** * Partition a DB result with backlinks in it into batches - * @param ResultWrapper $res Database result + * @param IResultWrapper $res Database result * @param int $batchSize * @param bool $isComplete Whether $res includes all the backlinks * @throws MWException diff --git a/includes/cache/LinkBatch.php b/includes/cache/LinkBatch.php index 7a0826e466..2573f8ac49 100644 --- a/includes/cache/LinkBatch.php +++ b/includes/cache/LinkBatch.php @@ -22,7 +22,7 @@ */ use MediaWiki\Linker\LinkTarget; use MediaWiki\MediaWikiServices; -use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; /** @@ -152,7 +152,7 @@ class LinkBatch { * parsing to avoid extra DB queries. * * @param LinkCache $cache - * @param ResultWrapper $res + * @param IResultWrapper $res * @return array Array of remaining titles */ public function addResultToCache( $cache, $res ) { @@ -188,7 +188,7 @@ class LinkBatch { /** * Perform the existence test query, return a ResultWrapper with page_id fields - * @return bool|ResultWrapper + * @return bool|IResultWrapper */ public function doQuery() { if ( $this->isEmpty() ) { -- 2.20.1