Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/177194
Change subject: Rename getSiteLinkTable to getSiteLinkLookup ...................................................................... Rename getSiteLinkTable to getSiteLinkLookup Looks like the interface was introduced later and that's why the getter is called after the sub class instead of the interface. Change-Id: Ib41e33e8306ac4cdf7d82342a5b72784c08405b3 --- M client/WikibaseClient.hooks.php M client/includes/WikibaseClient.php M client/includes/hooks/UpdateRepoHookHandlers.php M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php M client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php 8 files changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/94/177194/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index ad9078e..a10073f 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -174,7 +174,7 @@ public static function onSpecialMovepageAfterMove( MovePageForm $movePage, Title &$oldTitle, Title &$newTitle ) { $wikibaseClient = WikibaseClient::getDefaultInstance(); - $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkTable(); + $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkLookup(); $repoLinker = $wikibaseClient->newRepoLinker(); $movePageNotice = new MovePageNoticeCreator( @@ -377,7 +377,7 @@ } $wikibaseClient = WikibaseClient::getDefaultInstance(); - $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkTable(); + $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkLookup(); return $siteLinkLookup->getEntityIdForSiteLink( new SiteLink( $wikibaseClient->getSite()->getGlobalId(), @@ -672,7 +672,7 @@ $infoActionHookHandler = new InfoActionHookHandler( $namespaceChecker, $wikibaseClient->newRepoLinker(), - $wikibaseClient->getStore()->getSiteLinkTable(), + $wikibaseClient->getStore()->getSiteLinkLookup(), $settings->getSetting( 'siteGlobalID' ) ); @@ -692,7 +692,7 @@ */ public static function onArticleDeleteAfterSuccess( Title $title, OutputPage $out ) { $wikibaseClient = WikibaseClient::getDefaultInstance(); - $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkTable(); + $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkLookup(); $repoLinker = $wikibaseClient->newRepoLinker(); $deletePageNotice = new DeletePageNoticeCreator( diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index 7ed0f92..1a0f182 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -536,7 +536,7 @@ $this->getLanguageLinkBadgeDisplay(), $this->settings->getSetting( 'siteGlobalID' ), $this->getNamespaceChecker(), - $this->getStore()->getSiteLinkTable(), + $this->getStore()->getSiteLinkLookup(), $this->getStore()->getEntityLookup(), $this->getSiteStore()->getSites(), $this->getLangLinkSiteGroup() @@ -645,7 +645,7 @@ public function getOtherProjectsSidebarGeneratorFactory() { return new OtherProjectsSidebarGeneratorFactory( $this->settings, - $this->getStore()->getSiteLinkTable(), + $this->getStore()->getSiteLinkLookup(), $this->getSiteStore() ); } @@ -704,7 +704,7 @@ public function getPropertyParserFunctionRunner() { return new Runner( $this->getPropertyClaimsRendererFactory(), - $this->getStore()->getSiteLinkTable(), + $this->getStore()->getSiteLinkLookup(), $this->settings->getSetting( 'siteGlobalID' ) ); } diff --git a/client/includes/hooks/UpdateRepoHookHandlers.php b/client/includes/hooks/UpdateRepoHookHandlers.php index 45566a2..e609901 100644 --- a/client/includes/hooks/UpdateRepoHookHandlers.php +++ b/client/includes/hooks/UpdateRepoHookHandlers.php @@ -75,7 +75,7 @@ return true; } - $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkTable(); + $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkLookup(); return new UpdateRepoHookHandlers( $namespaceChecker, diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php index 5a9fac5..bd4de1e 100644 --- a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php @@ -48,7 +48,7 @@ return new WikibaseLuaBindings( $wikibaseClient->getEntityIdParser(), $entityLookup, - $wikibaseClient->getStore()->getSiteLinkTable(), + $wikibaseClient->getStore()->getSiteLinkLookup(), $wikibaseClient->getLanguageFallbackChainFactory(), $language, $wikibaseClient->getSettings(), diff --git a/client/includes/store/ClientStore.php b/client/includes/store/ClientStore.php index 4aa1cc2..b6f026e 100644 --- a/client/includes/store/ClientStore.php +++ b/client/includes/store/ClientStore.php @@ -26,7 +26,7 @@ * * @return SiteLinkLookup */ - public function getSiteLinkTable(); + public function getSiteLinkLookup(); /** * @since 0.5 diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 88ea5fa..3dad610 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -185,7 +185,7 @@ if ( $this->useLegacyUsageIndex ) { $this->usageLookup = new SiteLinkUsageLookup( $this->getSite()->getGlobalId(), - $this->getSiteLinkTable(), + $this->getSiteLinkLookup(), new TitleFactory() ); } else { @@ -245,13 +245,11 @@ } /** - * @see Store::getSiteLinkTable - * - * @since 0.4 + * @see ClientStore::getSiteLinkLookup * * @return SiteLinkLookup */ - public function getSiteLinkTable() { + public function getSiteLinkLookup() { if ( !$this->siteLinkTable ) { $this->siteLinkTable = $this->newSiteLinkTable(); } diff --git a/client/tests/phpunit/MockClientStore.php b/client/tests/phpunit/MockClientStore.php index 79ba782..9b6d402 100644 --- a/client/tests/phpunit/MockClientStore.php +++ b/client/tests/phpunit/MockClientStore.php @@ -60,9 +60,11 @@ } /** + * @see ClientStore::getSiteLinkLookup + * * @return SiteLinkLookup */ - public function getSiteLinkTable() { + public function getSiteLinkLookup() { return $this->getMock(); } diff --git a/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php b/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php index b52cf11..1115eb0 100644 --- a/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php +++ b/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php @@ -51,7 +51,7 @@ public static function provideGetters() { return array( - array( 'getSiteLinkTable', 'Wikibase\Lib\Store\SiteLinkTable' ), + array( 'getSiteLinkLookup', 'Wikibase\Lib\Store\SiteLinkTable' ), array( 'getEntityLookup', 'Wikibase\Lib\Store\EntityLookup' ), array( 'getTermIndex', 'Wikibase\TermIndex' ), array( 'getPropertyLabelResolver', 'Wikibase\PropertyLabelResolver' ), -- To view, visit https://gerrit.wikimedia.org/r/177194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib41e33e8306ac4cdf7d82342a5b72784c08405b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits