Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/172998
Change subject: Optimize all use sections in Lib ...................................................................... Optimize all use sections in Lib Change-Id: I79df2962f6f2932986aae1f37ca8bfb9836be09f --- M lib/includes/changes/EntityChange.php M lib/includes/formatters/EntityIdLabelFormatter.php M lib/includes/formatters/WikibaseValueFormatterBuilders.php M lib/includes/store/EntityRetrievingTermLookup.php M lib/includes/store/TermIndex.php M lib/includes/store/TermLookup.php M lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php M lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php M lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php M lib/tests/phpunit/serializers/SnakSerializerTest.php M lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php M lib/tests/phpunit/store/TermIndexTest.php 12 files changed, 9 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/98/172998/1 diff --git a/lib/includes/changes/EntityChange.php b/lib/includes/changes/EntityChange.php index 68fec7f..b5e3926 100644 --- a/lib/includes/changes/EntityChange.php +++ b/lib/includes/changes/EntityChange.php @@ -8,9 +8,9 @@ use User; use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Claim\Claim; +use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\Repo\WikibaseRepo; /** diff --git a/lib/includes/formatters/EntityIdLabelFormatter.php b/lib/includes/formatters/EntityIdLabelFormatter.php index 1081797..30e0bcb 100644 --- a/lib/includes/formatters/EntityIdLabelFormatter.php +++ b/lib/includes/formatters/EntityIdLabelFormatter.php @@ -9,7 +9,6 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\Lib\Store\LabelLookup; use Wikibase\Lib\Store\StorageException; -use Wikibase\Lib\Store\UnresolvedRedirectException; /** * @since 0.4 diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index 414d722..5596a21 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -13,11 +13,11 @@ use ValueFormatters\ValueFormatter; use Wikibase\LanguageFallbackChain; use Wikibase\LanguageFallbackChainFactory; +use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\EntityRetrievingTermLookup; +use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Lib\Store\LanguageFallbackLabelLookup; use Wikibase\Lib\Store\LanguageLabelLookup; -use Wikibase\Lib\Store\EntityLookup; -use Wikibase\Lib\Store\EntityTitleLookup; /** * Defines the formatters for DataValues supported by Wikibase. diff --git a/lib/includes/store/EntityRetrievingTermLookup.php b/lib/includes/store/EntityRetrievingTermLookup.php index f62b68d..ba5cc60 100644 --- a/lib/includes/store/EntityRetrievingTermLookup.php +++ b/lib/includes/store/EntityRetrievingTermLookup.php @@ -3,11 +3,8 @@ namespace Wikibase\Lib\Store; use OutOfBoundsException; -use Wikibase\DataModel\Entity\EntityId; use Wikibaes\DataModel\Term\Fingerprint; -use Wikibase\Lib\Store\EntityLookup; -use Wikibase\Lib\Store\StorageException; -use Wikibase\Lib\Store\UnresolvedRedirectException; +use Wikibase\DataModel\Entity\EntityId; /** * @since 0.5 diff --git a/lib/includes/store/TermIndex.php b/lib/includes/store/TermIndex.php index 8b36af2..e975e90 100644 --- a/lib/includes/store/TermIndex.php +++ b/lib/includes/store/TermIndex.php @@ -2,9 +2,9 @@ namespace Wikibase; -use Wikibase\Lib\Store\LabelConflictFinder; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; +use Wikibase\Lib\Store\LabelConflictFinder; /** * Interface to a cache for terms with both write and lookup methods. diff --git a/lib/includes/store/TermLookup.php b/lib/includes/store/TermLookup.php index 4c1b065..0a2ed8d 100644 --- a/lib/includes/store/TermLookup.php +++ b/lib/includes/store/TermLookup.php @@ -4,7 +4,6 @@ use OutOfBoundsException; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\Lib\Store\StorageException; /** * @since 0.5 diff --git a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php index d98285c..d0bbb8e 100644 --- a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php +++ b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php @@ -3,9 +3,9 @@ namespace Wikibase\Lib\Test; use Wikibase\DataModel\Entity\Property; +use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\EntityRetrievingDataTypeLookup; -use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\Lib\PropertyInfoDataTypeLookup; use Wikibase\PropertyInfoStore; use Wikibase\Test\MockPropertyInfoStore; diff --git a/lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php b/lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php index c4818cc..fd3bb96 100644 --- a/lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php +++ b/lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php @@ -2,16 +2,12 @@ namespace Wikibase\Test; -use Language; use ValueFormatters\FormatterOptions; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdValue; -use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\EntityIdLabelFormatter; -use Wikibase\Lib\Store\EntityRedirect; /** * @covers Wikibase\Lib\EntityIdLabelFormatter diff --git a/lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php b/lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php index 1033e76..bead849 100644 --- a/lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php +++ b/lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php @@ -7,12 +7,12 @@ use DataValues\StringValue; use DataValues\UnDeserializableValue; use ValueFormatters\FormatterOptions; +use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Entity\PropertyNotFoundException; use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\Lib\DispatchingValueFormatter; -use Wikibase\DataModel\Entity\PropertyDataTypeLookup; -use Wikibase\DataModel\Entity\PropertyNotFoundException; use Wikibase\Lib\PropertyValueSnakFormatter; use Wikibase\Lib\SnakFormatter; use Wikibase\Lib\UnDeserializableValueFormatter; diff --git a/lib/tests/phpunit/serializers/SnakSerializerTest.php b/lib/tests/phpunit/serializers/SnakSerializerTest.php index 62bfc5b..e41519b 100644 --- a/lib/tests/phpunit/serializers/SnakSerializerTest.php +++ b/lib/tests/phpunit/serializers/SnakSerializerTest.php @@ -4,10 +4,10 @@ use DataValues\StringValue; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Entity\PropertyNotFoundException; use Wikibase\DataModel\Snak\PropertyNoValueSnak; use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\DataModel\Entity\PropertyNotFoundException; use Wikibase\Lib\Serializers\SnakSerializer; /** diff --git a/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php b/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php index 4e43cab..6522410 100644 --- a/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php +++ b/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php @@ -2,7 +2,6 @@ namespace Wikibase\Test; -use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\Lib\Store\EntityRetrievingTermLookup; diff --git a/lib/tests/phpunit/store/TermIndexTest.php b/lib/tests/phpunit/store/TermIndexTest.php index fd22bec..6b068bf 100644 --- a/lib/tests/phpunit/store/TermIndexTest.php +++ b/lib/tests/phpunit/store/TermIndexTest.php @@ -2,7 +2,6 @@ namespace Wikibase\Test; -use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\Property; -- To view, visit https://gerrit.wikimedia.org/r/172998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79df2962f6f2932986aae1f37ca8bfb9836be09f 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