Skip to content

Commit

Permalink
Merge "client: Use namespaced classes"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jun 20, 2024
2 parents 35ed701 + 256c048 commit a65ffcd
Show file tree
Hide file tree
Showing 25 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use InvalidArgumentException;
use Language;
use MediaWiki\MediaWikiServices;
use MediaWiki\Message\Message;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Status\Status;
use MediaWiki\Title\Title;
use Message;
use Wikibase\Client\DataAccess\StatementTransclusionInteractor;
use Wikibase\Client\PropertyLabelNotResolvedException;
use Wikibase\DataModel\Entity\EntityId;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/DataAccess/ParserFunctions/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Client\DataAccess\ParserFunctions;

use Parser;
use MediaWiki\Parser\Parser;
use PPFrame;
use PPNode;
use Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Language;
use MediaWiki\Languages\LanguageConverterFactory;
use MediaWiki\Languages\LanguageFactory;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Title\Title;
use Parser;
use Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory;
use Wikibase\Client\DataAccess\PropertyIdResolver;
use Wikibase\Client\DataAccess\SnaksFinder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use InvalidArgumentException;
use Language;
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase;
use MediaWiki\Extension\Scribunto\ScribuntoException;
use MediaWiki\MediaWikiServices;
use MediaWiki\Parser\ParserOutput;
use Scribunto_LuaLibraryBase;
use Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory;
use Wikibase\Client\DataAccess\PropertyIdResolver;
use Wikibase\Client\DataAccess\SnaksFinder;
Expand All @@ -26,7 +26,7 @@
* @author Marius Hoch < [email protected] >
* @author Andrew Hall
*/
class Scribunto_LuaWikibaseEntityLibrary extends Scribunto_LuaLibraryBase implements ParserOutputProvider {
class Scribunto_LuaWikibaseEntityLibrary extends LibraryBase implements ParserOutputProvider {

/**
* @var WikibaseLuaEntityBindings|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
use Deserializers\Exceptions\DeserializationException;
use Exception;
use Language;
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase;
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaError;
use MediaWiki\Extension\Scribunto\ScribuntoException;
use MediaWiki\MediaWikiServices;
use MediaWiki\Parser\ParserOutput;
use Scribunto_LuaError;
use Scribunto_LuaLibraryBase;
use Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory;
use Wikibase\Client\DataAccess\PropertyIdResolver;
use Wikibase\Client\ParserOutput\ParserOutputProvider;
Expand All @@ -36,7 +36,7 @@
*
* @license GPL-2.0-or-later
*/
class Scribunto_LuaWikibaseLibrary extends Scribunto_LuaLibraryBase implements ParserOutputProvider {
class Scribunto_LuaWikibaseLibrary extends LibraryBase implements ParserOutputProvider {

/**
* @var WikibaseLanguageIndependentLuaBindings|null
Expand Down Expand Up @@ -423,7 +423,7 @@ public function getReferencedEntityId( string $prefixedFromEntityId, string $pre

$limit = WikibaseClient::getSettings()->getSetting( 'referencedEntityIdAccessLimit' );
if ( $accesses > $limit ) {
throw new Scribunto_LuaError(
throw new LuaError(
wfMessage( 'wikibase-error-exceeded-referenced-entity-id-limit' )->params( 'IGNORED' )->numParams( 3 )->text()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Client\DataAccess\Scribunto;

use Parser;
use MediaWiki\Parser\Parser;
use Wikibase\DataModel\Snak\Snak;
use Wikibase\Lib\Formatters\SnakFormatter;
use Wikimedia\Assert\Assert;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/BeforePageDisplayHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Wikibase\Client\Hooks;

use MediaWiki\Hook\BeforePageDisplayHook;
use MediaWiki\Output\Hook\BeforePageDisplayHook;
use MediaWiki\Output\OutputPage;
use MediaWiki\Title\Title;
use MediaWiki\User\User;
Expand Down
8 changes: 4 additions & 4 deletions client/includes/Hooks/EchoNotificationsHandlers.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Diff\DiffOp\DiffOp;
use Diff\DiffOp\DiffOpAdd;
use Diff\DiffOp\DiffOpChange;
use EchoEvent;
use ExtensionRegistry;
use MediaWiki\Extension\Notifications\Model\Event;
use MediaWiki\MediaWikiServices;
use MediaWiki\Page\RedirectLookup;
use MediaWiki\Title\Title;
Expand Down Expand Up @@ -114,10 +114,10 @@ public static function factory(): self {
* Handler for EchoGetBundleRules hook
* @see https://www.mediawiki.org/wiki/Notifications/Developer_guide#Bundled_notifications
*
* @param EchoEvent $event
* @param Event $event
* @param string &$bundleString
*/
public static function onEchoGetBundleRules( EchoEvent $event, &$bundleString ) {
public static function onEchoGetBundleRules( Event $event, &$bundleString ) {
if ( $event->getType() === self::NOTIFICATION_TYPE ) {
$bundleString = self::NOTIFICATION_TYPE;
}
Expand Down Expand Up @@ -196,7 +196,7 @@ public function doWikibaseHandleChange( Change $change ) {
$metadata = $change->getMetadata();
$entityId = $change->getEntityId();
$agent = User::newFromName( $metadata['user_text'], false );
EchoEvent::create( [
Event::create( [
'agent' => $agent,
'extra' => [
// maybe also a diff link?
Expand Down
8 changes: 4 additions & 4 deletions client/includes/Hooks/EchoSetupHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Wikibase\Client\Hooks;

use EchoAttributeManager;
use EchoUserLocator;
use MediaWiki\Extension\Notifications\AttributeManager;
use MediaWiki\Extension\Notifications\UserLocator;
use Wikibase\Client\Notifications\PageConnectionPresentationModel;
use Wikibase\Lib\SettingsArray;

Expand Down Expand Up @@ -70,8 +70,8 @@ public function onBeforeCreateEchoEvent(
];

$notifications[EchoNotificationsHandlers::NOTIFICATION_TYPE] = [
EchoAttributeManager::ATTR_LOCATORS => [
[ [ EchoUserLocator::class, 'locateArticleCreator' ] ],
AttributeManager::ATTR_LOCATORS => [
[ [ UserLocator::class, 'locateArticleCreator' ] ],
],
'category' => 'wikibase-action',
'group' => 'neutral',
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/EditActionHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Wikibase\Client\Hooks;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\EditPage\EditPage;
use MediaWiki\Hook\EditPage__showStandardInputs_optionsHook;
use MediaWiki\Html\Html;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/InfoActionHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Client\Hooks;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Hook\InfoActionHook;
use MediaWiki\Html\Html;
use MediaWiki\Title\Title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Wikibase\Client\Hooks;

use DatabaseUpdater;
use MediaWiki\Installer\DatabaseUpdater;
use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook;
use Onoi\MessageReporter\CallbackMessageReporter;
use Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer;
Expand Down
4 changes: 2 additions & 2 deletions client/includes/Hooks/MagicWordHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use Language;
use MediaWiki\Hook\MagicWordwgVariableIDsHook;
use MediaWiki\Hook\ParserGetVariableValueSwitchHook;
use MediaWiki\Message\Message;
use MediaWiki\Parser\Parser;
// phpcs:disable MediaWiki.Classes.FullQualifiedClassName -- T308814
use MediaWiki\ResourceLoader as RL;
use MediaWiki\ResourceLoader\Hook\ResourceLoaderJqueryMsgModuleMagicWordsHook;
use Message;
use Parser;
use PPFrame;
use Wikibase\Lib\SettingsArray;

Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/NoLangLinkHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Wikibase\Client\Hooks;

use MediaWiki\Parser\Parser;
use MediaWiki\Parser\ParserOutput;
use Parser;
use Wikibase\Client\NamespaceChecker;
use Wikibase\Client\WikibaseClient;

Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/ParserFunctionRegistrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use MediaWiki\Hook\GetDoubleUnderscoreIDsHook;
use MediaWiki\Hook\ParserFirstCallInitHook;
use Parser;
use MediaWiki\Parser\Parser;
use PPFrame;
use Wikibase\Client\DataAccess\ParserFunctions\Runner;
use Wikibase\Lib\ParserFunctions\CommaSeparatedList;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/ParserHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use MediaWiki\Hook\ParserClearStateHook;
use MediaWiki\Hook\ParserLimitReportPrepareHook;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\ParserOutput;
use Parser;
use Wikibase\DataModel\Services\Lookup\RestrictedEntityLookup;
use Wikibase\Lib\SettingsArray;

Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/ShortDescHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Client\Hooks;

use Parser;
use MediaWiki\Parser\Parser;
use Wikibase\Client\Store\DescriptionLookup;

/**
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/SidebarHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Wikibase\Client\Hooks;

use MediaWiki\Hook\OutputPageParserOutputHook;
use MediaWiki\Hook\SidebarBeforeOutputHook;
use MediaWiki\Hook\SkinTemplateGetLanguageLinkHook;
use MediaWiki\Output\Hook\OutputPageParserOutputHook;
use MediaWiki\Output\OutputPage;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Title\Title;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/TrivialHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use ContentHandler;
use MediaWiki\Content\Hook\SearchDataForIndexHook;
use MediaWiki\Hook\AbortEmailNotificationHook;
use MediaWiki\Hook\BeforePageDisplayHook;
use MediaWiki\Hook\MaintenanceShellStartHook;
use MediaWiki\Hook\UnitTestsListHook;
use MediaWiki\Output\Hook\BeforePageDisplayHook;
use MediaWiki\Output\OutputPage;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Revision\RevisionRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Wikibase\Client\Notifications;

use EchoEvent;
use EchoEventPresentationModel;
use MediaWiki\Extension\Notifications\Formatters\EchoEventPresentationModel;
use MediaWiki\Extension\Notifications\Model\Event;
use MediaWiki\Title\Title;
use Wikibase\Client\Hooks\EchoNotificationsHandlers;

Expand All @@ -16,11 +16,11 @@
class PageConnectionPresentationModel extends EchoEventPresentationModel {

/**
* @param EchoEvent $event
* @param Event $event
*
* @return string|null
*/
public function callbackForBundleCount( EchoEvent $event ) {
public function callbackForBundleCount( Event $event ) {
$title = $event->getTitle();
if ( $title !== null ) {
return $title->getPrefixedText();
Expand Down
2 changes: 1 addition & 1 deletion client/includes/RecentChanges/RecentChangeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Wikibase\Client\RecentChanges;

use Language;
use MediaWiki\Message\Message;
use MediaWiki\Title\Title;
use MediaWiki\User\CentralId\CentralIdLookup;
use MediaWiki\User\ExternalUserNames;
use Message;
use RecentChange;
use Wikibase\DataAccess\EntitySourceDefinitions;
use Wikibase\Lib\Changes\ChangeRow;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/RecentChanges/SiteLinkCommentCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Diff\DiffOp\DiffOpChange;
use Diff\DiffOp\DiffOpRemove;
use Language;
use MediaWiki\Message\Message;
use MediaWiki\Site\SiteLookup;
use MediaWiki\Title\Title;
use Message;

/**
* Creates an array structure with comment information for storing
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Specials/SpecialEntityUsage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Wikibase\Client\Specials;

use HtmlArmor;
use HTMLForm;
use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\Languages\LanguageConverterFactory;
use MediaWiki\Linker\Linker;
use MediaWiki\SpecialPage\QueryPage;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Specials/SpecialPagesWithBadges.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Wikibase\Client\Specials;

use HTMLForm;
use InvalidArgumentException;
use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\SpecialPage\QueryPage;
use MediaWiki\Title\Title;
use Skin;
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Wikibase\Client\Usage\Sql;

use DatabaseUpdater;
use MediaWiki\Installer\DatabaseUpdater;
use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook;
use Onoi\MessageReporter\CallbackMessageReporter;
use RuntimeException;
Expand Down

0 comments on commit a65ffcd

Please sign in to comment.