Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/204270
Change subject: Fix undefined class warnings in repo ...................................................................... Fix undefined class warnings in repo This patch fixes a whole bunch of undefined class warnings in repo, as reported by PHPStorm. Change-Id: I3e14de5068ef996856680d43a3241ac69c45d51e --- M repo/includes/BuilderBasedDataTypeValidatorFactory.php M repo/includes/DataTypeValidatorFactory.php M repo/includes/Diff/EntityContentDiffView.php M repo/includes/LinkedData/EntityDataRequestHandler.php M repo/includes/LinkedData/EntityDataSerializationService.php M repo/includes/actions/ViewEntityAction.php M repo/includes/api/GetEntities.php M repo/includes/rdf/RdfBuilder.php M repo/includes/rdf/RdfSerializer.php M repo/maintenance/dumpEntities.php M repo/maintenance/dumpJson.php M repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php M repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php M repo/tests/phpunit/includes/store/sql/WikiPageEntityMetaDataLookupTest.php M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 15 files changed, 22 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/70/204270/1 diff --git a/repo/includes/BuilderBasedDataTypeValidatorFactory.php b/repo/includes/BuilderBasedDataTypeValidatorFactory.php index 9a628a3..5780b04 100644 --- a/repo/includes/BuilderBasedDataTypeValidatorFactory.php +++ b/repo/includes/BuilderBasedDataTypeValidatorFactory.php @@ -2,6 +2,8 @@ namespace Wikibase\Repo; +use ValueValidators\ValueValidator; + /** * A factory providing ValueValidators based on DataType id that uses ValidatorBuilders. * diff --git a/repo/includes/DataTypeValidatorFactory.php b/repo/includes/DataTypeValidatorFactory.php index 0bc68f4..69bb30e 100644 --- a/repo/includes/DataTypeValidatorFactory.php +++ b/repo/includes/DataTypeValidatorFactory.php @@ -2,6 +2,8 @@ namespace Wikibase\Repo; +use ValueValidators\ValueValidator; + /** * A factory providing ValueValidators based on DataType id. * diff --git a/repo/includes/Diff/EntityContentDiffView.php b/repo/includes/Diff/EntityContentDiffView.php index 07f3358..bed715f 100644 --- a/repo/includes/Diff/EntityContentDiffView.php +++ b/repo/includes/Diff/EntityContentDiffView.php @@ -17,6 +17,7 @@ use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; use Wikibase\EntityContent; +use Wikibase\Lib\EntityIdFormatter; use Wikibase\Lib\EntityIdHtmlLinkFormatter; use Wikibase\Lib\EntityIdLabelFormatter; use Wikibase\Lib\EscapingEntityIdFormatter; diff --git a/repo/includes/LinkedData/EntityDataRequestHandler.php b/repo/includes/LinkedData/EntityDataRequestHandler.php index 7a29deb..d4e4e85 100644 --- a/repo/includes/LinkedData/EntityDataRequestHandler.php +++ b/repo/includes/LinkedData/EntityDataRequestHandler.php @@ -16,7 +16,6 @@ use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Lib\Store\StorageException; -use Wikibase\UnloggedHttpError; /** * Request handler implementing a linked data interface for Wikibase entities. diff --git a/repo/includes/LinkedData/EntityDataSerializationService.php b/repo/includes/LinkedData/EntityDataSerializationService.php index 15218eb..2adb4ff 100644 --- a/repo/includes/LinkedData/EntityDataSerializationService.php +++ b/repo/includes/LinkedData/EntityDataSerializationService.php @@ -101,7 +101,7 @@ private $serializerFactory; /** - * @var PropertyInfoDataTypeLookup + * @var PropertyDataTypeLookup */ private $propertyLookup; diff --git a/repo/includes/actions/ViewEntityAction.php b/repo/includes/actions/ViewEntityAction.php index 8ad3b89..ab2b050 100644 --- a/repo/includes/actions/ViewEntityAction.php +++ b/repo/includes/actions/ViewEntityAction.php @@ -7,6 +7,7 @@ use OutputPage; use SpecialPage; use ViewAction; +use Wikibase\Repo\Content\EntityHandler; /** * Handles the view action for Wikibase entities. diff --git a/repo/includes/api/GetEntities.php b/repo/includes/api/GetEntities.php index 2380ad9..f2fb28b 100644 --- a/repo/includes/api/GetEntities.php +++ b/repo/includes/api/GetEntities.php @@ -10,6 +10,7 @@ use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\Serializers\EntitySerializer; use Wikibase\Lib\Serializers\SerializationOptions; +use Wikibase\Lib\Store\EntityPrefetcher; use Wikibase\Lib\Store\UnresolvedRedirectException; use Wikibase\Repo\SiteLinkTargetProvider; use Wikibase\Repo\WikibaseRepo; diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php index 77c17a2..a99ca2a 100644 --- a/repo/includes/rdf/RdfBuilder.php +++ b/repo/includes/rdf/RdfBuilder.php @@ -13,6 +13,8 @@ use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\SiteLink; +use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Snak\Snak; use Wikibase\DataModel\Statement\Statement; use Wikibase\DataModel\StatementListProvider; diff --git a/repo/includes/rdf/RdfSerializer.php b/repo/includes/rdf/RdfSerializer.php index 0f0089e..fab2823 100644 --- a/repo/includes/rdf/RdfSerializer.php +++ b/repo/includes/rdf/RdfSerializer.php @@ -63,7 +63,7 @@ private $dedupBag; /** - * @param EasyRdf_Format $format + * @param RdfWriter $emitter * @param string $baseUri * @param string $dataUri * @param SiteList $sites; diff --git a/repo/maintenance/dumpEntities.php b/repo/maintenance/dumpEntities.php index 7c3853b..3f7dc06 100644 --- a/repo/maintenance/dumpEntities.php +++ b/repo/maintenance/dumpEntities.php @@ -9,12 +9,13 @@ use Wikibase\Lib\Reporting\ExceptionHandler; use Wikibase\Lib\Reporting\ObservableMessageReporter; use Wikibase\Lib\Reporting\ReportingExceptionHandler; -use Wikibase\Lib\Serializers\Serializer; use Wikibase\Lib\Store\EntityLookup; +use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\RevisionBasedEntityLookup; use Wikibase\Repo\IO\EntityIdReader; use Wikibase\Repo\IO\LineReader; use Wikibase\Repo\Store\EntityIdPager; +use Wikibase\Repo\Store\EntityPerPage; use Wikibase\Repo\Store\SQL\EntityPerPageIdPager; use Wikibase\Repo\WikibaseRepo; use Wikibase\Dumpers\DumpGenerator; diff --git a/repo/maintenance/dumpJson.php b/repo/maintenance/dumpJson.php index 10b123b..71c87cc 100644 --- a/repo/maintenance/dumpJson.php +++ b/repo/maintenance/dumpJson.php @@ -1,5 +1,8 @@ <?php + namespace Wikibase; + +use Wikibase\Dumpers\DumpGenerator; use Wikibase\Dumpers\JsonDumpGenerator; use Wikibase\Lib\Serializers\DispatchingEntitySerializer; use Wikibase\Lib\Serializers\SerializationOptions; diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php index b3f597b..1562bcb 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php @@ -27,6 +27,8 @@ use Wikibase\Lib\ClaimGuidGenerator; use Wikibase\Lib\ClaimGuidValidator; use Wikibase\Lib\Store\SiteLinkCache; +use Wikibase\Lib\Store\SiteLinkConflictLookup; +use Wikibase\Repo\DataTypeValidatorFactory; use Wikibase\Validators\CompositeFingerprintValidator; use Wikibase\Validators\CompositeValidator; use Wikibase\Validators\DataValueValidator; diff --git a/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php b/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php index a7aeb60..cb39da5 100644 --- a/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test; +use FauxResponse; use Site; use SiteStore; use Wikibase\DataModel\Entity\ItemId; diff --git a/repo/tests/phpunit/includes/store/sql/WikiPageEntityMetaDataLookupTest.php b/repo/tests/phpunit/includes/store/sql/WikiPageEntityMetaDataLookupTest.php index 7f56323..26123fc 100644 --- a/repo/tests/phpunit/includes/store/sql/WikiPageEntityMetaDataLookupTest.php +++ b/repo/tests/phpunit/includes/store/sql/WikiPageEntityMetaDataLookupTest.php @@ -4,18 +4,11 @@ use MediaWikiTestCase; use Wikibase\DataModel\Entity\BasicEntityIdParser; -use Wikibase\DataModel\Entity\EntityDocument; use Wikibase\DataModel\Entity\Item; -use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\ItemId; -use Wikibase\DataModel\Term\AliasGroupList; -use Wikibase\DataModel\Term\Fingerprint; -use Wikibase\DataModel\Term\TermList; +use Wikibase\EntityRevision; use Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataLookup; use Wikibase\Repo\WikibaseRepo; -use Wikibase\StringNormalizer; -use Wikibase\Term; -use Wikibase\TermSqlIndex; /** * This test needs to be in repo, although the class is in lib as we can't alter @@ -141,4 +134,5 @@ // Verify that Q823487354 (doesn't exist) is not part of the result $this->assertFalse( $result['Q823487354'] ); } + } diff --git a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php index b87d14e..b149f86 100644 --- a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php +++ b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php @@ -185,7 +185,7 @@ * @dataProvider provideSaveEntityError */ public function testSaveEntityError( Entity $entity, $flags, $baseRevId, $error ) { - /* @var EntityStore $store */ + /** @var WikiPageEntityStore $store */ list( $store, ) = $this->createStoreAndLookup(); $user = $GLOBALS['wgUser']; -- To view, visit https://gerrit.wikimedia.org/r/204270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e14de5068ef996856680d43a3241ac69c45d51e 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