Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/168612
Change subject: Upper case SiteLink in UsageAccumulators ...................................................................... Upper case SiteLink in UsageAccumulators Change-Id: I341c31f813c761e59a69bc698fa8fa6fbb010033 --- M client/includes/LangLinkHandler.php M client/includes/Usage/HashUsageAccumulator.php M client/includes/Usage/ParserOutputUsageAccumulator.php M client/includes/Usage/UsageAccumulator.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php M client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php 7 files changed, 8 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/12/168612/1 diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index af0eceb..6951177 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -484,7 +484,7 @@ $out->setProperty( 'wikibase_item', $itemId->getSerialization() ); $usageAccumulator = new ParserOutputUsageAccumulator( $out ); - $usageAccumulator->addSitelinksUsage( $itemId ); + $usageAccumulator->addSiteLinksUsage( $itemId ); } else { $out->unsetProperty( 'wikibase_item' ); } diff --git a/client/includes/Usage/HashUsageAccumulator.php b/client/includes/Usage/HashUsageAccumulator.php index a1be44c..7302851 100644 --- a/client/includes/Usage/HashUsageAccumulator.php +++ b/client/includes/Usage/HashUsageAccumulator.php @@ -16,11 +16,7 @@ /** * @var EntityUsage[] */ - private $usages; - - public function __construct() { - $this->usages = array(); - } + private $usages = array(); /** * Registers usage of the given aspect of the given entity. @@ -68,7 +64,7 @@ * * @param EntityId $id */ - public function addSitelinksUsage( EntityId $id ) { + public function addSiteLinksUsage( EntityId $id ) { $this->addUsage( $id, EntityUsage::SITELINK_USAGE ); } diff --git a/client/includes/Usage/ParserOutputUsageAccumulator.php b/client/includes/Usage/ParserOutputUsageAccumulator.php index 5b74b26..4eb5c69 100644 --- a/client/includes/Usage/ParserOutputUsageAccumulator.php +++ b/client/includes/Usage/ParserOutputUsageAccumulator.php @@ -21,7 +21,6 @@ private $parserOutput; public function __construct( ParserOutput $parserOutput ) { - $this->parserOutput = $parserOutput; } @@ -75,7 +74,7 @@ * * @param EntityId $id */ - public function addSitelinksUsage( EntityId $id ) { + public function addSiteLinksUsage( EntityId $id ) { $this->addUsage( $id, EntityUsage::SITELINK_USAGE ); } diff --git a/client/includes/Usage/UsageAccumulator.php b/client/includes/Usage/UsageAccumulator.php index 3dcef95..364668c 100644 --- a/client/includes/Usage/UsageAccumulator.php +++ b/client/includes/Usage/UsageAccumulator.php @@ -32,7 +32,7 @@ * * @param EntityId $id */ - public function addSitelinksUsage( EntityId $id ); + public function addSiteLinksUsage( EntityId $id ); /** * Registers the usage of other or all data of an entity (e.g. when accessed diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php index 8a0abc0..569791d 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php @@ -53,7 +53,7 @@ ->method( 'addAllUsage' ); $mock->expects( $this->never() ) - ->method( 'addSitelinksUsage' ); + ->method( 'addSiteLinksUsage' ); return $mock; } diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php index 7afb256..4af9d53 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php @@ -33,7 +33,7 @@ ->method( 'addAllUsage' ); $mock->expects( $this->never() ) - ->method( 'addSitelinksUsage' ); + ->method( 'addSiteLinksUsage' ); return $mock; } diff --git a/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php b/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php index 5f31e54..652a439 100644 --- a/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php +++ b/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php @@ -31,7 +31,7 @@ $q2 = new ItemId( 'Q2' ); $q3 = new ItemId( 'Q3' ); - $this->usageAccumulator->addSitelinksUsage( $q2 ); + $this->usageAccumulator->addSiteLinksUsage( $q2 ); $this->usageAccumulator->addLabelUsage( $q2 ); $this->usageAccumulator->addPageUsage( $q2 ); $this->usageAccumulator->addAllUsage( $q3 ); -- To view, visit https://gerrit.wikimedia.org/r/168612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I341c31f813c761e59a69bc698fa8fa6fbb010033 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