jenkins-bot has submitted this change and it was merged. Change subject: Clean up after DataModel 2.0 switch ......................................................................
Clean up after DataModel 2.0 switch Just some minor clean ups. Main change is the missing use clauses. Change-Id: I4bd3823205fffc6bdcb37106369845fd918c9c7f --- M repo/includes/content/EntityContent.php M repo/tests/phpunit/includes/content/EntityHandlerTest.php M repo/tests/phpunit/includes/content/ItemHandlerTest.php M repo/tests/phpunit/includes/content/PropertyHandlerTest.php 4 files changed, 12 insertions(+), 13 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 5dd5f0d..bccbc52 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -24,6 +24,8 @@ use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; use Wikibase\DataModel\Entity\BasicEntityIdParser; +use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\SnakFormatter; use Wikibase\Lib\Store\EntityInfoBuilderFactory; diff --git a/repo/tests/phpunit/includes/content/EntityHandlerTest.php b/repo/tests/phpunit/includes/content/EntityHandlerTest.php index 804b77d..556be12 100644 --- a/repo/tests/phpunit/includes/content/EntityHandlerTest.php +++ b/repo/tests/phpunit/includes/content/EntityHandlerTest.php @@ -47,7 +47,7 @@ } /** - * @param SettingsArray $settings + * @param SettingsArray|null $settings * * @return WikibaseRepo */ @@ -62,14 +62,14 @@ } /** - * @param SettingsArray $settings + * @param SettingsArray|null $settings * * @return EntityHandler */ protected abstract function getHandler( SettingsArray $settings = null ); /** - * @param Entity $entity + * @param Entity|null $entity * * @return EntityContent */ @@ -94,7 +94,7 @@ } /** - * @param EntityId $id + * @param EntityId|null $id * * @return Entity */ @@ -102,12 +102,10 @@ /** * Returns EntityContents that can be handled by the EntityHandler deriving class. - * @return array + * + * @return array[] */ public function contentProvider() { - /** - * @var EntityContent $content - */ $content = $this->newEntityContent(); $content->getEntity()->addAliases( 'en', array( 'foo' ) ); $content->getEntity()->setDescription( 'de', 'foobar' ); @@ -126,10 +124,9 @@ */ public function testGetModelName( EntityHandler $entityHandler ) { $this->assertEquals( $this->getModelId(), $entityHandler->getModelID() ); - $this->assertInstanceOf( '\ContentHandler', $entityHandler ); + $this->assertInstanceOf( 'ContentHandler', $entityHandler ); $this->assertInstanceOf( $this->getClassName(), $entityHandler ); } - /** * @dataProvider instanceProvider @@ -406,7 +403,7 @@ } public function testExportTransform_neverRecodeNonLegacyFormat() { - $codec = $this->getMockBuilder( '\Wikibase\Lib\Store\EntityContentDataCodec' ) + $codec = $this->getMockBuilder( 'Wikibase\Lib\Store\EntityContentDataCodec' ) ->disableOriginalConstructor() ->getMock(); $codec->expects( $this->never() ) diff --git a/repo/tests/phpunit/includes/content/ItemHandlerTest.php b/repo/tests/phpunit/includes/content/ItemHandlerTest.php index 1461d8e..118fc72 100644 --- a/repo/tests/phpunit/includes/content/ItemHandlerTest.php +++ b/repo/tests/phpunit/includes/content/ItemHandlerTest.php @@ -41,7 +41,7 @@ * @return string */ public function getClassName() { - return '\Wikibase\Repo\Content\ItemHandler'; + return 'Wikibase\Repo\Content\ItemHandler'; } /** diff --git a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php index 1baa133..aa80779 100644 --- a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php +++ b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php @@ -37,7 +37,7 @@ * @return string */ public function getClassName() { - return '\Wikibase\Repo\Content\PropertyHandler'; + return 'Wikibase\Repo\Content\PropertyHandler'; } /** -- To view, visit https://gerrit.wikimedia.org/r/166757 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bd3823205fffc6bdcb37106369845fd918c9c7f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: JanZerebecki <jan.wikime...@zerebecki.de> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits