Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/172999
Change subject: Optimize all use sections in Client ...................................................................... Optimize all use sections in Client Change-Id: I6ab1d09a3e55ac7d8b25362c187969015ad1f68b --- M client/includes/Changes/ChangeHandler.php M client/includes/DataAccess/PropertyIdResolver.php M client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php M client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php M client/includes/DataAccess/PropertyParserFunction/Runner.php M client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php M client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php M client/includes/LangLinkHandler.php M client/includes/Usage/Sql/UsageTableUpdater.php M client/includes/WikibaseClient.php M client/includes/hooks/DataUpdateHookHandlers.php M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php M client/includes/scribunto/WikibaseLuaBindings.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php M client/tests/phpunit/includes/Changes/ChangeHandlerTest.php M client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php M client/tests/phpunit/includes/LangLinkHandlerTest.php M client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php M client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php M client/tests/phpunit/includes/Usage/UsageLookupContractTester.php M client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php M client/tests/phpunit/includes/UsageUpdaterTest.php M client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php M client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php M client/tests/phpunit/includes/store/TitleFactoryTest.php 31 files changed, 43 insertions(+), 71 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/99/172999/1 diff --git a/client/includes/Changes/ChangeHandler.php b/client/includes/Changes/ChangeHandler.php index 5ff4576..4885c35 100644 --- a/client/includes/Changes/ChangeHandler.php +++ b/client/includes/Changes/ChangeHandler.php @@ -6,8 +6,6 @@ use MWException; use Title; use Wikibase\Change; -use Wikibase\Client\Changes\AffectedPagesFinder; -use Wikibase\Client\Changes\PageUpdater; use Wikibase\DataModel\Entity\Diff\EntityDiff; use Wikibase\DataModel\Entity\Diff\ItemDiff; use Wikibase\EntityChange; diff --git a/client/includes/DataAccess/PropertyIdResolver.php b/client/includes/DataAccess/PropertyIdResolver.php index 395377b..d4a77ed 100644 --- a/client/includes/DataAccess/PropertyIdResolver.php +++ b/client/includes/DataAccess/PropertyIdResolver.php @@ -3,8 +3,6 @@ namespace Wikibase\DataAccess; use InvalidArgumentException; -use Wikibase\DataModel\Entity\Entity; -use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\PropertyLabelNotResolvedException; use Wikibase\PropertyLabelResolver; diff --git a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php index 84fa3c6..8af6deb 100644 --- a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php +++ b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php @@ -5,10 +5,8 @@ use InvalidArgumentException; use Language; use Status; -use Wikibase\Client\WikibaseClient; +use Wikibase\Client\Usage\UsageAccumulator; use Wikibase\DataAccess\PropertyIdResolver; -use Wikibase\DataModel\Claim\Claims; -use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdValue; use Wikibase\DataModel\Entity\PropertyId; @@ -16,7 +14,6 @@ use Wikibase\DataModel\Snak\Snak; use Wikibase\Lib\PropertyLabelNotResolvedException; use Wikibase\Lib\SnakFormatter; -use Wikibase\Client\Usage\UsageAccumulator; /** * PropertyClaimsRenderer of the {{#property}} parser function. diff --git a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php index ef2eccd..7afbdab 100644 --- a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php +++ b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php @@ -5,12 +5,12 @@ use Language; use Parser; use ValueFormatters\FormatterOptions; +use Wikibase\Client\Usage\ParserOutputUsageAccumulator; +use Wikibase\Client\Usage\UsageAccumulator; use Wikibase\DataAccess\PropertyIdResolver; use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\OutputFormatSnakFormatterFactory; use Wikibase\Lib\SnakFormatter; -use Wikibase\Client\Usage\ParserOutputUsageAccumulator; -use Wikibase\Client\Usage\UsageAccumulator; /** * @since 0.5 diff --git a/client/includes/DataAccess/PropertyParserFunction/Runner.php b/client/includes/DataAccess/PropertyParserFunction/Runner.php index 36f2947..978904a 100644 --- a/client/includes/DataAccess/PropertyParserFunction/Runner.php +++ b/client/includes/DataAccess/PropertyParserFunction/Runner.php @@ -3,11 +3,11 @@ namespace Wikibase\DataAccess\PropertyParserFunction; use Parser; +use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; use Wikibase\Lib\Store\SiteLinkLookup; -use Wikibase\Client\Usage\ParserOutputUsageAccumulator; /** * Runner for the {{#property}} parser function. diff --git a/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php b/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php index 7412cfe..8913c3c 100644 --- a/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php +++ b/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php @@ -2,17 +2,12 @@ namespace Wikibase\DataAccess\PropertyParserFunction; -use InvalidArgumentException; -use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Claim\Claims; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\Snak; -use Wikibase\Lib\PropertyLabelNotResolvedException; use Wikibase\Lib\Store\EntityLookup; -use Wikibase\PropertyLabelResolver; /** * Find Snaks for claims in an entity, with EntityId, based on property label or property id. diff --git a/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php b/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php index e618e6d..8bf6860 100644 --- a/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php +++ b/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php @@ -2,7 +2,6 @@ namespace Wikibase\DataAccess\PropertyParserFunction; -use Language; use Wikibase\DataModel\Entity\EntityId; /** diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index af0eceb..ba49481 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -8,12 +8,12 @@ use Title; use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay; use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; +use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\SiteLinkLookup; -use Wikibase\Client\Usage\ParserOutputUsageAccumulator; /** * @todo split this up and find a better home for stuff that adds diff --git a/client/includes/Usage/Sql/UsageTableUpdater.php b/client/includes/Usage/Sql/UsageTableUpdater.php index ccdf941..3b8185a 100644 --- a/client/includes/Usage/Sql/UsageTableUpdater.php +++ b/client/includes/Usage/Sql/UsageTableUpdater.php @@ -5,7 +5,6 @@ use DatabaseBase; use InvalidArgumentException; use Wikibase\Client\Usage\EntityUsage; -use Wikibase\DataModel\Entity\EntityId; /** * Helper class for updating the wb_entity_usage table. diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index ae30502..c03355c 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -14,8 +14,9 @@ use SiteSQLStore; use SiteStore; use ValueFormatters\FormatterOptions; -use Wikibase\Client\Changes\ChangeHandler; use Wikibase\Client\Changes\AffectedPagesFinder; +use Wikibase\Client\Changes\ChangeHandler; +use Wikibase\Client\Changes\WikiPageUpdater; use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay; use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; use Wikibase\Client\Hooks\ParserFunctionRegistrant; @@ -51,7 +52,6 @@ use Wikibase\Settings; use Wikibase\SettingsArray; use Wikibase\StringNormalizer; -use Wikibase\Client\Changes\WikiPageUpdater; /** * Top level factory for the WikibaseClient extension. diff --git a/client/includes/hooks/DataUpdateHookHandlers.php b/client/includes/hooks/DataUpdateHookHandlers.php index 3f1b82e..369079e 100644 --- a/client/includes/hooks/DataUpdateHookHandlers.php +++ b/client/includes/hooks/DataUpdateHookHandlers.php @@ -7,10 +7,10 @@ use StripState; use Title; use Wikibase\Client\Store\UsageUpdater; +use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use Wikibase\NamespaceChecker; use Wikibase\Updates\DataUpdateAdapter; -use Wikibase\Client\Usage\ParserOutputUsageAccumulator; /** * Hook handlers for triggering data updates. diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php index 94e1b28..5abe2aa 100644 --- a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php @@ -3,9 +3,9 @@ use Wikibase\Client\Scribunto\WikibaseLuaBindings; use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Entity\EntityIdParsingException; -use Wikibase\Utils; -use Wikibase\Lib\Store\LanguageLabelLookup; use Wikibase\Lib\Store\EntityRetrievingTermLookup; +use Wikibase\Lib\Store\LanguageLabelLookup; +use Wikibase\Utils; /** * Registers and defines functions to access Wikibase through the Scribunto extension diff --git a/client/includes/scribunto/WikibaseLuaBindings.php b/client/includes/scribunto/WikibaseLuaBindings.php index 60eb008..ada4285 100644 --- a/client/includes/scribunto/WikibaseLuaBindings.php +++ b/client/includes/scribunto/WikibaseLuaBindings.php @@ -2,22 +2,22 @@ namespace Wikibase\Client\Scribunto; -use Language; use InvalidArgumentException; +use Language; use OutOfBoundsException; use Wikibase\DataModel\Entity\Entity; -use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\EntityIdParser; +use Wikibase\DataModel\Entity\EntityIdParsingException; +use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Serializers\Serializer; use Wikibase\Lib\Serializers\SerializerFactory; use Wikibase\Lib\Store\EntityLookup; -use Wikibase\Lib\Store\SiteLinkLookup; use Wikibase\Lib\Store\LabelLookup; +use Wikibase\Lib\Store\SiteLinkLookup; use Wikibase\Lib\Store\StorageException; -use Wikibase\DataModel\Entity\PropertyDataTypeLookup; -use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\SettingsArray; /** diff --git a/client/includes/store/ClientStore.php b/client/includes/store/ClientStore.php index 75925d0..3173620 100644 --- a/client/includes/store/ClientStore.php +++ b/client/includes/store/ClientStore.php @@ -3,11 +3,11 @@ namespace Wikibase; use Wikibase\Client\Usage\SubscriptionManager; +use Wikibase\Client\Usage\UsageLookup; +use Wikibase\Client\Usage\UsageTracker; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\SiteLinkLookup; -use Wikibase\Client\Usage\UsageLookup; -use Wikibase\Client\Usage\UsageTracker; /** * Client store interface. diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 11dee62..7080e93 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -5,12 +5,15 @@ use Language; use LoadBalancer; use ObjectCache; -use RuntimeException; use Site; +use Wikibase\Client\Store\Sql\ConnectionManager; use Wikibase\Client\Store\TitleFactory; use Wikibase\Client\Usage\NullUsageTracker; use Wikibase\Client\Usage\SiteLinkUsageLookup; +use Wikibase\Client\Usage\Sql\SqlUsageTracker; use Wikibase\Client\Usage\SubscriptionManager; +use Wikibase\Client\Usage\UsageLookup; +use Wikibase\Client\Usage\UsageTracker; use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Entity\EntityIdParser; use Wikibase\Lib\Store\CachingEntityRevisionLookup; @@ -22,10 +25,6 @@ use Wikibase\Lib\Store\SiteLinkLookup; use Wikibase\Lib\Store\SiteLinkTable; use Wikibase\Lib\Store\WikiPageEntityRevisionLookup; -use Wikibase\Client\Store\Sql\ConnectionManager; -use Wikibase\Client\Usage\Sql\SqlUsageTracker; -use Wikibase\Client\Usage\UsageLookup; -use Wikibase\Client\Usage\UsageTracker; /** * Implementation of the client store interface using direct access to the repository's diff --git a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php index e28d88a..b07bc39 100644 --- a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php +++ b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php @@ -4,13 +4,13 @@ use ArrayIterator; use Title; +use Wikibase\Client\Changes\AffectedPagesFinder; use Wikibase\Client\Store\TitleFactory; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; use Wikibase\ItemChange; use Wikibase\Lib\Store\StorageException; -use Wikibase\Client\Changes\AffectedPagesFinder; use Wikibase\Test\TestChanges; /** diff --git a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php index ca77828..ed2dc41 100644 --- a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php +++ b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php @@ -8,9 +8,10 @@ use SiteList; use Title; use Wikibase\Change; -use Wikibase\Client\Changes\ChangeHandler; use Wikibase\ChangesTable; use Wikibase\Client\Changes\AffectedPagesFinder; +use Wikibase\Client\Changes\ChangeHandler; +use Wikibase\Client\Changes\PageUpdater; use Wikibase\Client\Store\TitleFactory; use Wikibase\Client\Usage\UsageLookup; use Wikibase\Client\WikibaseClient; @@ -23,8 +24,6 @@ use Wikibase\Lib\Store\SiteLinkLookup; use Wikibase\Lib\Store\StorageException; use Wikibase\NamespaceChecker; -use Wikibase\Client\Changes\PageUpdater; -use Wikibase\Client\Tests\Changes\MockPageUpdater; use Wikibase\Test\MockRepository; use Wikibase\Test\TestChanges; diff --git a/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php b/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php index ddb48cc..e77d9f5 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php @@ -3,16 +3,11 @@ namespace Wikibase\DataAccess\Tests; use DataValues\StringValue; -use Language; use Wikibase\DataAccess\PropertyIdResolver; -use Wikibase\DataModel\Claim; use Wikibase\DataModel\Claim\Statement; -use Wikibase\DataModel\Entity\BasicEntityIdParser; -use Wikibase\DataModel\Entity\Item; -use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Claim; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\Test\MockPropertyLabelResolver; use Wikibase\Test\MockRepository; diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php index d61128d..2fcd320 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php @@ -5,6 +5,7 @@ use DataValues\StringValue; use Language; use Wikibase\Client\Usage\EntityUsage; +use Wikibase\Client\Usage\UsageAccumulator; use Wikibase\DataAccess\PropertyIdResolver; use Wikibase\DataAccess\PropertyParserFunction\LanguageAwareRenderer; use Wikibase\DataAccess\PropertyParserFunction\SnaksFinder; @@ -16,7 +17,6 @@ use Wikibase\DataModel\Snak\Snak; use Wikibase\Lib\PropertyLabelNotResolvedException; use Wikibase\Lib\SnakFormatter; -use Wikibase\Client\Usage\UsageAccumulator; /** * @covers Wikibase\DataAccess\PropertyParserFunction\LanguageAwareRenderer diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php index 00823d1..7c555ae 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php @@ -7,11 +7,7 @@ use ParserOptions; use Title; use User; -use Wikibase\Client\Usage\HashUsageAccumulator; use Wikibase\DataAccess\PropertyParserFunction\PropertyClaimsRendererFactory; -use Wikibase\DataModel\Entity\ItemId; -use Wikibase\LanguageFallbackChainFactory; -use Wikibase\Lib\SnakFormatter; /** * @covers Wikibase\DataAccess\PropertyParserFunction\PropertyClaimsRendererFactory diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php index 4bcf4b3..c277654 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php @@ -7,10 +7,9 @@ use ParserOutput; use Title; use Wikibase\Client\Usage\EntityUsage; -use Wikibase\DataAccess\PropertyParserFunction\PropertyClaimsRenderer; +use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\DataAccess\PropertyParserFunction\Runner; use Wikibase\DataModel\Entity\ItemId; -use Wikibase\Client\Usage\ParserOutputUsageAccumulator; /** * @covers Wikibase\DataAccess\PropertyParserFunction\Runner diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php index aaa5b94..571f252 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php @@ -11,7 +11,6 @@ use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Statement\Statement; -use Wikibase\Test\MockPropertyLabelResolver; use Wikibase\Test\MockRepository; /** diff --git a/client/tests/phpunit/includes/LangLinkHandlerTest.php b/client/tests/phpunit/includes/LangLinkHandlerTest.php index 2550958..19cc73c 100644 --- a/client/tests/phpunit/includes/LangLinkHandlerTest.php +++ b/client/tests/phpunit/includes/LangLinkHandlerTest.php @@ -8,13 +8,13 @@ use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay; use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; use Wikibase\Client\Usage\EntityUsage; +use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; use Wikibase\LangLinkHandler; use Wikibase\NamespaceChecker; use Wikibase\NoLangLinkHandler; -use Wikibase\Client\Usage\ParserOutputUsageAccumulator; /** * @covers Wikibase\LangLinkHandler diff --git a/client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php b/client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php index a47bcc0..e930a14 100644 --- a/client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php +++ b/client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php @@ -2,8 +2,8 @@ namespace Wikibase\Client\Tests\UpdateRepo; -use Wikibase\DataModel\Entity\ItemId; use Wikibase\Client\UpdateRepo\UpdateRepoOnMove; +use Wikibase\DataModel\Entity\ItemId; /** * @covers Wikibase\Client\UpdateRepo\UpdateRepoOnMove diff --git a/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php b/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php index 5f31e54..e2e3acf 100644 --- a/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php +++ b/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php @@ -1,10 +1,10 @@ <?php namespace Wikibase\Client\Usage\Tests; -use Wikibase\Client\Usage\EntityUsage; -use Wikibase\DataModel\Entity\ItemId; -use Wikibase\Client\Usage\UsageAccumulator; use PHPUnit_Framework_Assert as Assert; +use Wikibase\Client\Usage\EntityUsage; +use Wikibase\Client\Usage\UsageAccumulator; +use Wikibase\DataModel\Entity\ItemId; /** * Contract tester for implementations of the UsageAccumulator interface diff --git a/client/tests/phpunit/includes/Usage/UsageLookupContractTester.php b/client/tests/phpunit/includes/Usage/UsageLookupContractTester.php index b184fc0..7791451 100644 --- a/client/tests/phpunit/includes/Usage/UsageLookupContractTester.php +++ b/client/tests/phpunit/includes/Usage/UsageLookupContractTester.php @@ -1,11 +1,11 @@ <?php namespace Wikibase\Client\Tests\Usage; -use Wikibase\Client\Usage\EntityUsage; -use Wikibase\DataModel\Entity\ItemId; -use Wikibase\Client\Usage\UsageLookup; use PHPUnit_Framework_Assert as Assert; +use Wikibase\Client\Usage\EntityUsage; +use Wikibase\Client\Usage\UsageLookup; use Wikibase\Client\Usage\UsageTracker; +use Wikibase\DataModel\Entity\ItemId; /** * Helper class for unit tests for UsageLookup implementations, providing diff --git a/client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php b/client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php index b9ccf12..72824f7 100644 --- a/client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php +++ b/client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php @@ -1,11 +1,11 @@ <?php namespace Wikibase\Client\Tests\Usage; +use PHPUnit_Framework_Assert as Assert; use PHPUnit_Framework_TestCase; use Wikibase\Client\Usage\EntityUsage; -use Wikibase\DataModel\Entity\ItemId; use Wikibase\Client\Usage\UsageTracker; -use PHPUnit_Framework_Assert as Assert; +use Wikibase\DataModel\Entity\ItemId; /** * Base class for unit tests for UsageTracker implementations, providing diff --git a/client/tests/phpunit/includes/UsageUpdaterTest.php b/client/tests/phpunit/includes/UsageUpdaterTest.php index e9ecc1f..a3fb4e8 100644 --- a/client/tests/phpunit/includes/UsageUpdaterTest.php +++ b/client/tests/phpunit/includes/UsageUpdaterTest.php @@ -4,11 +4,11 @@ use PHPUnit_Framework_Assert; use Wikibase\Client\Store\UsageUpdater; +use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\SubscriptionManager; -use Wikibase\DataModel\Entity\ItemId; use Wikibase\Client\Usage\UsageLookup; use Wikibase\Client\Usage\UsageTracker; -use Wikibase\Client\Usage\EntityUsage; +use Wikibase\DataModel\Entity\ItemId; /** * @covers Wikibase\Client\Store\UsageUpdater diff --git a/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php b/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php index f535857..ddcce3c 100644 --- a/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php +++ b/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php @@ -2,7 +2,6 @@ namespace Wikibase\Test; -use MediaWikiTestCase; use Wikibase\Client\Hooks\BaseTemplateAfterPortletHandler; /** @@ -36,7 +35,7 @@ if ( $expected === null ) { $this->assertNull( $formattedLink ); } else { - MediaWikiTestCase::assertTag( $expected, $formattedLink ); + \MediaWikiTestCase::assertTag( $expected, $formattedLink ); } } diff --git a/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php b/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php index b9d4819..0005c05 100644 --- a/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php +++ b/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php @@ -19,8 +19,8 @@ use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay; use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; use Wikibase\Client\Hooks\SidebarHookHandlers; -use Wikibase\Client\WikibaseClient; use Wikibase\Client\Usage\EntityUsage; +use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; diff --git a/client/tests/phpunit/includes/store/TitleFactoryTest.php b/client/tests/phpunit/includes/store/TitleFactoryTest.php index f3d40e2..b04a685 100644 --- a/client/tests/phpunit/includes/store/TitleFactoryTest.php +++ b/client/tests/phpunit/includes/store/TitleFactoryTest.php @@ -1,7 +1,7 @@ <?php + namespace Wikibase\Client\Tests\Usage; -use MediaWikiTestCase; use PHPUnit_Framework_TestCase; use Title; use Wikibase\Client\Store\TitleFactory; @@ -20,7 +20,7 @@ * @license GPL 2+ * @author Daniel Kinzler */ -class TitleFactoryTest extends MediaWikiTestCase { +class TitleFactoryTest extends \MediaWikiTestCase { private function makePage( $name ) { $title = Title::makeTitle( NS_HELP, $name ); -- To view, visit https://gerrit.wikimedia.org/r/172999 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ab1d09a3e55ac7d8b25362c187969015ad1f68b 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