mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 15:16:56 +00:00
Use namespaced classes
Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I4cf7903b9700e6366bdf349f99ffd4a04da0c087
This commit is contained in:
parent
cecbd594d1
commit
7038c68f13
|
@ -9,6 +9,7 @@ use MediaWiki\Extension\Math\MathWikibaseConnector;
|
|||
use MediaWiki\Extension\Math\Render\RendererFactory;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use Wikibase\Client\WikibaseClient;
|
||||
use Wikibase\Lib\Formatters\SnakFormatter;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
use MediaWiki\Extension\Math\MathRenderer;
|
||||
use MediaWiki\Maintenance\Maintenance;
|
||||
|
||||
require_once __DIR__ . '/../../../maintenance/Maintenance.php';
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* @ingroup Maintenance
|
||||
*/
|
||||
|
||||
use MediaWiki\Maintenance\Maintenance;
|
||||
|
||||
require_once __DIR__ . '/../../../maintenance/Maintenance.php';
|
||||
|
||||
class MathGenerateSql extends Maintenance {
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
* @ingroup Maintenance
|
||||
*/
|
||||
|
||||
use MediaWiki\Maintenance\Maintenance;
|
||||
|
||||
require_once __DIR__ . '/../../../maintenance/Maintenance.php';
|
||||
|
||||
// phpcs:disable MediaWiki.Files.ClassMatchesFilename.NotMatch
|
||||
|
|
|
@ -14,8 +14,8 @@ use MediaWiki\Hook\ParserOptionsRegisterHook;
|
|||
use MediaWiki\HookContainer\HookContainer;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\Parser\Parser;
|
||||
use MediaWiki\Parser\ParserOptions;
|
||||
use MediaWiki\User\Options\UserOptionsLookup;
|
||||
use ParserOptions;
|
||||
|
||||
/**
|
||||
* Hook handler for Parser hooks
|
||||
|
|
|
@ -10,11 +10,11 @@ namespace MediaWiki\Extension\Math;
|
|||
|
||||
// phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
|
||||
|
||||
use ExtensionRegistry;
|
||||
use Maintenance;
|
||||
use MediaWiki\Config\ConfigException;
|
||||
use MediaWiki\Context\RequestContext;
|
||||
use MediaWiki\Hook\MaintenanceRefreshLinksInitHook;
|
||||
use MediaWiki\Maintenance\Maintenance;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use MediaWiki\Settings\SettingsBuilder;
|
||||
use MediaWiki\SpecialPage\Hook\SpecialPage_initListHook;
|
||||
use MediaWiki\User\Options\UserOptionsManager;
|
||||
|
|
|
@ -6,7 +6,7 @@ use MediaWiki\Config\ServiceOptions;
|
|||
use MediaWiki\Extension\Math\MathRestbaseInterface;
|
||||
use MediaWiki\Http\HttpRequestFactory;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
class InputCheckFactory {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use MediaWiki\Extension\Math\MathRenderer;
|
|||
use MediaWiki\Extension\Math\WikiTexVC\TexVC;
|
||||
use MediaWiki\HookContainer\HookContainer;
|
||||
use MediaWiki\Message\Message;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
class LocalChecker extends BaseChecker {
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ use MediaWiki\Http\HttpRequestFactory;
|
|||
use MediaWiki\Message\Message;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use RuntimeException;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
class MathoidChecker extends BaseChecker {
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace MediaWiki\Extension\Math;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\Config\ServiceOptions;
|
||||
use MediaWiki\Message\Message;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use Wikibase\Client\WikibaseClient;
|
||||
|
||||
class MathConfig {
|
||||
|
|
|
@ -18,7 +18,7 @@ use Psr\Log\LoggerInterface;
|
|||
use StatusValue;
|
||||
use stdClass;
|
||||
use Throwable;
|
||||
use XmlTypeCheck;
|
||||
use Wikimedia\Mime\XmlTypeCheck;
|
||||
|
||||
/**
|
||||
* Converts LaTeX to MathML using the mathoid-server
|
||||
|
|
|
@ -20,7 +20,7 @@ use MediaWiki\Parser\Parser;
|
|||
use MediaWiki\Parser\Sanitizer;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use StringUtils;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
/**
|
||||
* Abstract base class with static methods for rendering the <math> tags using
|
||||
|
|
|
@ -13,6 +13,7 @@ use MediaWiki\Logger\LoggerFactory;
|
|||
use MediaWiki\MediaWikiServices;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use stdClass;
|
||||
use Wikimedia\Http\MultiHttpClient;
|
||||
|
||||
class MathRestbaseInterface {
|
||||
/** @var string|false */
|
||||
|
@ -53,9 +54,9 @@ class MathRestbaseInterface {
|
|||
* Bundles several requests for fetching MathML.
|
||||
* Does not send requests, if the input TeX is invalid.
|
||||
* @param MathRestbaseInterface[] $rbis
|
||||
* @param \MultiHttpClient $multiHttpClient
|
||||
* @param MultiHttpClient $multiHttpClient
|
||||
*/
|
||||
private static function batchGetMathML( array $rbis, \MultiHttpClient $multiHttpClient ) {
|
||||
private static function batchGetMathML( array $rbis, MultiHttpClient $multiHttpClient ) {
|
||||
$requests = [];
|
||||
$skips = [];
|
||||
$i = 0;
|
||||
|
|
|
@ -13,7 +13,7 @@ use MediaWiki\Extension\Math\MathRenderer;
|
|||
use MediaWiki\Extension\Math\MathSource;
|
||||
use MediaWiki\User\Options\UserOptionsLookup;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
class RendererFactory {
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace MediaWiki\Extension\Math;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\Extension\Math\Render\RendererFactory;
|
||||
use MediaWiki\Extension\Math\Widget\MathTestInputForm;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use MediaWiki\SpecialPage\SpecialPage;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use MediaWiki\Logger\LoggerFactory;
|
|||
use MediaWiki\Message\Message;
|
||||
use MediaWiki\Tests\Unit\MockServiceDependenciesTrait;
|
||||
use MediaWikiIntegrationTestCase;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
/**
|
||||
* @method InputCheckFactory newServiceInstance(string $serviceClass, array $parameterOverrides)
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace MediaWiki\Extension\Math\InputCheck;
|
||||
|
||||
use HashBagOStuff;
|
||||
use MediaWiki\Message\Message;
|
||||
use MediaWikiIntegrationTestCase;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\HashBagOStuff;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
/**
|
||||
* @group Math
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
namespace MediaWiki\Extension\Math\InputCheck;
|
||||
|
||||
use HashBagOStuff;
|
||||
use MediaWiki\Extension\Math\Math;
|
||||
use MediaWiki\Extension\Math\MathMathML;
|
||||
use MediaWiki\Http\HttpRequestFactory;
|
||||
use MediaWikiIntegrationTestCase;
|
||||
use MockHttpTrait;
|
||||
use RuntimeException;
|
||||
use WANObjectCache;
|
||||
use Wikimedia\ObjectCache\HashBagOStuff;
|
||||
use Wikimedia\ObjectCache\WANObjectCache;
|
||||
|
||||
class MathoidCheckerTest extends MediaWikiIntegrationTestCase {
|
||||
use MockHttpTrait;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
namespace MediaWiki\Extension\Math\Tests;
|
||||
|
||||
use MockHttpTrait;
|
||||
use MultiHttpClient;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Wikimedia\Http\MultiHttpClient;
|
||||
|
||||
trait MathMockHttpTrait {
|
||||
use MockHttpTrait;
|
||||
|
|
|
@ -4,6 +4,7 @@ use MediaWiki\Extension\Math\InvalidTeXException;
|
|||
use MediaWiki\Extension\Math\MathRestbaseException;
|
||||
use MediaWiki\Extension\Math\MathRestbaseInterface;
|
||||
use MediaWiki\Extension\Math\Tests\MathMockHttpTrait;
|
||||
use Wikimedia\Http\MultiHttpClient;
|
||||
|
||||
/**
|
||||
* Test the interface to access Restbase paths
|
||||
|
|
|
@ -7,8 +7,8 @@ use MediaWiki\Extension\Math\MathConfig;
|
|||
use MediaWiki\Extension\Math\MathRenderer;
|
||||
use MediaWiki\Extension\Math\Render\RendererFactory;
|
||||
use MediaWiki\Page\PageReferenceValue;
|
||||
use MediaWiki\Parser\ParserOptions;
|
||||
use MediaWikiIntegrationTestCase;
|
||||
use ParserOptions;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace MediaWiki\Extension\Math\Tests;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\Extension\Math\Hooks;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use MediaWiki\Settings\Config\ArrayConfigBuilder;
|
||||
use MediaWiki\Settings\Config\PhpIniSink;
|
||||
use MediaWiki\Settings\SettingsBuilder;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace MediaWiki\Extension\Math\Tests;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\Config\ServiceOptions;
|
||||
use MediaWiki\Extension\Math\MathConfig;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
namespace MediaWiki\Extension\Math\Tests;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\Config\HashConfig;
|
||||
use MediaWiki\Config\ServiceOptions;
|
||||
use MediaWiki\Extension\Math\Math;
|
||||
use MediaWiki\Extension\Math\MathConfig;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use MediaWikiUnitTestCase;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
namespace MediaWiki\Extension\Math\Tests;
|
||||
|
||||
use DataValues\StringValue;
|
||||
use ExtensionRegistry;
|
||||
use Language;
|
||||
use MediaWiki\Config\ServiceOptions;
|
||||
use MediaWiki\Extension\Math\MathFormatter;
|
||||
use MediaWiki\Extension\Math\MathWikibaseConnector;
|
||||
use MediaWiki\Language\Language;
|
||||
use MediaWiki\Languages\LanguageFactory;
|
||||
use MediaWiki\Languages\LanguageNameUtils;
|
||||
use MediaWiki\Registration\ExtensionRegistry;
|
||||
use MediaWiki\Site\Site;
|
||||
use MediaWikiUnitTestCase;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
*/
|
||||
require_once __DIR__ . '/../../../maintenance/Maintenance.php';
|
||||
|
||||
use MediaWiki\Content\TextContent;
|
||||
use MediaWiki\Extension\Math\MathConfig;
|
||||
use MediaWiki\Extension\Math\MathMathMLCli;
|
||||
use MediaWiki\Maintenance\Maintenance;
|
||||
use MediaWiki\Parser\Parser;
|
||||
use MediaWiki\Parser\Sanitizer;
|
||||
use MediaWiki\Title\Title;
|
||||
|
|
Loading…
Reference in a new issue