Merge "Remove unused default values from class properties"
This commit is contained in:
commit
297d1bfb0e
29 changed files with 51 additions and 44 deletions
|
|
@ -244,7 +244,7 @@ class EditPage implements IEditObject {
|
||||||
private $watchthis = false;
|
private $watchthis = false;
|
||||||
|
|
||||||
/** @var bool Corresponds to $wgWatchlistExpiry */
|
/** @var bool Corresponds to $wgWatchlistExpiry */
|
||||||
private $watchlistExpiryEnabled = false;
|
private $watchlistExpiryEnabled;
|
||||||
|
|
||||||
/** @var WatchedItemStoreInterface */
|
/** @var WatchedItemStoreInterface */
|
||||||
private $watchedItemStore;
|
private $watchedItemStore;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class PageProps {
|
||||||
private const CACHE_SIZE = 100; // integer; max cached pages
|
private const CACHE_SIZE = 100; // integer; max cached pages
|
||||||
|
|
||||||
/** @var MapCacheLRU */
|
/** @var MapCacheLRU */
|
||||||
private $cache = null;
|
private $cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return PageProps
|
* @return PageProps
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace MediaWiki\Rest;
|
||||||
class HttpException extends \Exception {
|
class HttpException extends \Exception {
|
||||||
|
|
||||||
/** @var array|null */
|
/** @var array|null */
|
||||||
private $errorData = null;
|
private $errorData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @stable to call
|
* @stable to call
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,10 @@ namespace MediaWiki\Rest;
|
||||||
* fill with null bytes as in a real file, it throws an exception instead.
|
* fill with null bytes as in a real file, it throws an exception instead.
|
||||||
*/
|
*/
|
||||||
class StringStream implements CopyableStreamInterface {
|
class StringStream implements CopyableStreamInterface {
|
||||||
private $contents = '';
|
|
||||||
|
/** @var string */
|
||||||
|
private $contents;
|
||||||
|
/** @var int */
|
||||||
private $offset = 0;
|
private $offset = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class NameTableStore {
|
||||||
private $tableCache = null;
|
private $tableCache = null;
|
||||||
|
|
||||||
/** @var bool|string */
|
/** @var bool|string */
|
||||||
private $domain = false;
|
private $domain;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $cacheTTL;
|
private $cacheTTL;
|
||||||
|
|
@ -60,9 +60,9 @@ class NameTableStore {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $nameField;
|
private $nameField;
|
||||||
/** @var null|callable */
|
/** @var null|callable */
|
||||||
private $normalizationCallback = null;
|
private $normalizationCallback;
|
||||||
/** @var null|callable */
|
/** @var null|callable */
|
||||||
private $insertCallback = null;
|
private $insertCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ILoadBalancer $dbLoadBalancer A load balancer for acquiring database connections
|
* @param ILoadBalancer $dbLoadBalancer A load balancer for acquiring database connections
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class ApiContinuationManager {
|
||||||
private $source;
|
private $source;
|
||||||
|
|
||||||
private $allModules = [];
|
private $allModules = [];
|
||||||
private $generatedModules = [];
|
private $generatedModules;
|
||||||
|
|
||||||
/** @var array[] */
|
/** @var array[] */
|
||||||
private $continuationData = [];
|
private $continuationData = [];
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
* @ingroup API
|
* @ingroup API
|
||||||
*/
|
*/
|
||||||
class ApiOpenSearchFormatJson extends ApiFormatJson {
|
class ApiOpenSearchFormatJson extends ApiFormatJson {
|
||||||
private $warningsAsError = false;
|
private $warningsAsError;
|
||||||
|
|
||||||
public function __construct( ApiMain $main, $fm, $warningsAsError ) {
|
public function __construct( ApiMain $main, $fm, $warningsAsError ) {
|
||||||
parent::__construct( $main, "json$fm" );
|
parent::__construct( $main, "json$fm" );
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class ApiPageSet extends ApiBase {
|
||||||
private const DISABLE_GENERATORS = 1;
|
private const DISABLE_GENERATORS = 1;
|
||||||
|
|
||||||
private $mDbSource;
|
private $mDbSource;
|
||||||
private $mParams = [];
|
private $mParams;
|
||||||
private $mResolveRedirects;
|
private $mResolveRedirects;
|
||||||
private $mConvertTitles;
|
private $mConvertTitles;
|
||||||
private $mAllowGenerator;
|
private $mAllowGenerator;
|
||||||
|
|
@ -85,7 +85,7 @@ class ApiPageSet extends ApiBase {
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $mRequestedPageFields = [];
|
private $mRequestedPageFields = [];
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $mDefaultNamespace = NS_MAIN;
|
private $mDefaultNamespace;
|
||||||
/** @var callable|null */
|
/** @var callable|null */
|
||||||
private $mRedirectMergePolicy;
|
private $mRedirectMergePolicy;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class LocalisationCache {
|
||||||
* Setting this reduces the overhead of cache freshness checking, which
|
* Setting this reduces the overhead of cache freshness checking, which
|
||||||
* requires doing a stat() for every extension i18n file.
|
* requires doing a stat() for every extension i18n file.
|
||||||
*/
|
*/
|
||||||
private $manualRecache = false;
|
private $manualRecache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cache data. 3-d array, where the first key is the language code,
|
* The cache data. 3-d array, where the first key is the language code,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ use Wikimedia\Assert\Assert;
|
||||||
* @since 1.34
|
* @since 1.34
|
||||||
*/
|
*/
|
||||||
class ServiceOptions {
|
class ServiceOptions {
|
||||||
private $keys = [];
|
private $keys;
|
||||||
private $options = [];
|
private $options = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ final class ContentHandlerFactory implements IContentHandlerFactory {
|
||||||
/**
|
/**
|
||||||
* @var string[]|callable[]
|
* @var string[]|callable[]
|
||||||
*/
|
*/
|
||||||
private $handlerSpecs = [];
|
private $handlerSpecs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ContentHandler[] Registry of ContentHandler instances by model id
|
* @var ContentHandler[] Registry of ContentHandler instances by model id
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ use Wikimedia\Assert\Assert;
|
||||||
*/
|
*/
|
||||||
class HtmlFileCacheUpdate implements DeferrableUpdate, MergeableUpdate {
|
class HtmlFileCacheUpdate implements DeferrableUpdate, MergeableUpdate {
|
||||||
/** @var PageIdentity[] List of pages */
|
/** @var PageIdentity[] List of pages */
|
||||||
private $pages = [];
|
private $pages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param PageIdentity[] $pages List of pages
|
* @param PageIdentity[] $pages List of pages
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class ForeignAPIFile extends File {
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $mExists;
|
private $mExists;
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $mInfo = [];
|
private $mInfo;
|
||||||
|
|
||||||
protected $repoClass = ForeignAPIRepo::class;
|
protected $repoClass = ForeignAPIRepo::class;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class LocalFileRestoreBatch {
|
||||||
private $all;
|
private $all;
|
||||||
|
|
||||||
/** @var bool Whether to remove all settings for suppressed fields */
|
/** @var bool Whether to remove all settings for suppressed fields */
|
||||||
private $unsuppress = false;
|
private $unsuppress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param LocalFile $file
|
* @param LocalFile $file
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
* Wrapper around strtr() that holds replacements
|
* Wrapper around strtr() that holds replacements
|
||||||
*/
|
*/
|
||||||
class ReplacementArray {
|
class ReplacementArray {
|
||||||
private $data = [];
|
private $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an object with the specified replacement array
|
* Create an object with the specified replacement array
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class LBFactorySimple extends LBFactory {
|
||||||
private $loadMonitorConfig;
|
private $loadMonitorConfig;
|
||||||
|
|
||||||
/** @var array[] Map of (server index => server config map) */
|
/** @var array[] Map of (server index => server config map) */
|
||||||
private $mainServers = [];
|
private $mainServers;
|
||||||
/** @var array[][] Map of (cluster => server index => server config map) */
|
/** @var array[][] Map of (cluster => server index => server config map) */
|
||||||
private $externalServersByCluster = [];
|
private $externalServersByCluster = [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ class SVGReader {
|
||||||
public const LANG_PREFIX_MATCH = 1;
|
public const LANG_PREFIX_MATCH = 1;
|
||||||
public const LANG_FULL_MATCH = 2;
|
public const LANG_FULL_MATCH = 2;
|
||||||
|
|
||||||
/** @var null|XMLReader */
|
/** @var XMLReader */
|
||||||
private $reader = null;
|
private $reader;
|
||||||
|
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $mDebug = false;
|
private $mDebug = false;
|
||||||
|
|
|
||||||
|
|
@ -43,17 +43,17 @@ class VersionChecker {
|
||||||
/**
|
/**
|
||||||
* @var string[] List of installed PHP extensions
|
* @var string[] List of installed PHP extensions
|
||||||
*/
|
*/
|
||||||
private $phpExtensions = [];
|
private $phpExtensions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool[] List of provided abilities
|
* @var bool[] List of provided abilities
|
||||||
*/
|
*/
|
||||||
private $abilities = [];
|
private $abilities;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] List of provided ability errors
|
* @var string[] List of provided ability errors
|
||||||
*/
|
*/
|
||||||
private $abilityErrors = [];
|
private $abilityErrors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Loaded extensions
|
* @var array Loaded extensions
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ final class SessionBackend {
|
||||||
private $delaySave = 0;
|
private $delaySave = 0;
|
||||||
|
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $usePhpSessionHandling = true;
|
private $usePhpSessionHandling;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $checkPHPSessionRecursionGuard = false;
|
private $checkPHPSessionRecursionGuard = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,13 @@ class Token {
|
||||||
public const SUFFIX = '+\\';
|
public const SUFFIX = '+\\';
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $secret = '';
|
private $secret;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $salt = '';
|
private $salt;
|
||||||
|
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $new = false;
|
private $new;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $secret Token secret
|
* @param string $secret Token secret
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class SkinFactory {
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
private $skipSkins = [];
|
private $skipSkins;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal For ServiceWiring only
|
* @internal For ServiceWiring only
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class SpecialBotPasswords extends FormSpecialPage {
|
||||||
private $password = null;
|
private $password = null;
|
||||||
|
|
||||||
/** @var Psr\Log\LoggerInterface */
|
/** @var Psr\Log\LoggerInterface */
|
||||||
private $logger = null;
|
private $logger;
|
||||||
|
|
||||||
/** @var PasswordFactory */
|
/** @var PasswordFactory */
|
||||||
private $passwordFactory;
|
private $passwordFactory;
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@ use MediaWiki\MediaWikiServices;
|
||||||
class ImportReporter extends ContextSource {
|
class ImportReporter extends ContextSource {
|
||||||
use ProtectedHookAccessorTrait;
|
use ProtectedHookAccessorTrait;
|
||||||
|
|
||||||
private $reason = false;
|
private $reason;
|
||||||
private $logTags = [];
|
private $logTags = [];
|
||||||
private $mOriginalLogCallback = null;
|
private $mOriginalLogCallback;
|
||||||
private $mOriginalPageOutCallback = null;
|
private $mOriginalPageOutCallback;
|
||||||
private $mLogItemCount = 0;
|
private $mLogItemCount = 0;
|
||||||
private $mPageCount;
|
private $mPageCount;
|
||||||
private $mIsUpload;
|
private $mIsUpload;
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class ContribsPager extends RangeChronologicalPager {
|
||||||
/**
|
/**
|
||||||
* @var string|int A single namespace number, or an empty string for all namespaces
|
* @var string|int A single namespace number, or an empty string for all namespaces
|
||||||
*/
|
*/
|
||||||
private $namespace = '';
|
private $namespace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string|false Name of tag to filter, or false to ignore tags
|
* @var string|false Name of tag to filter, or false to ignore tags
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,13 @@
|
||||||
* @since 1.23
|
* @since 1.23
|
||||||
*/
|
*/
|
||||||
class MalformedTitleException extends Exception implements ILocalizedException {
|
class MalformedTitleException extends Exception implements ILocalizedException {
|
||||||
private $titleText = null;
|
|
||||||
private $errorMessage = null;
|
/** @var string|null */
|
||||||
private $errorMessageParameters = [];
|
private $titleText;
|
||||||
|
/** @var string */
|
||||||
|
private $errorMessage;
|
||||||
|
/** @var array */
|
||||||
|
private $errorMessageParameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @stable to call
|
* @stable to call
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ class BotPassword implements IDBAccessObject {
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
private $grants;
|
private $grants;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int Defaults to {@see READ_NORMAL} */
|
||||||
private $flags = self::READ_NORMAL;
|
private $flags;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param stdClass $row bot_passwords database row
|
* @param stdClass $row bot_passwords database row
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ class ExternalUserNames {
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $usernamePrefix = 'imported';
|
private $usernamePrefix;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
private $assignKnownUsers = false;
|
private $assignKnownUsers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool[]
|
* @var bool[]
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ use Psr\Log\LogLevel;
|
||||||
* @since 1.27
|
* @since 1.27
|
||||||
*/
|
*/
|
||||||
class TestLogger extends \Psr\Log\AbstractLogger {
|
class TestLogger extends \Psr\Log\AbstractLogger {
|
||||||
private $collect = false;
|
private $collect;
|
||||||
private $collectContext = false;
|
private $collectContext;
|
||||||
private $buffer = [];
|
private $buffer = [];
|
||||||
/** @var callable|null */
|
/** @var callable|null */
|
||||||
private $filter;
|
private $filter;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class ParserIntegrationTest extends PHPUnit\Framework\TestCase {
|
||||||
private $ptRunner;
|
private $ptRunner;
|
||||||
|
|
||||||
/** @var string|null */
|
/** @var string|null */
|
||||||
private $skipMessage = null;
|
private $skipMessage;
|
||||||
|
|
||||||
public function __construct( $runner, $fileName, $test, $skipMessage = null ) {
|
public function __construct( $runner, $fileName, $test, $skipMessage = null ) {
|
||||||
parent::__construct( 'testParse', [ ( $test['parsoid'] ?? false ) ? 'parsoid' : 'legacy parser' ],
|
parent::__construct( 'testParse', [ ( $test['parsoid'] ?? false ) ? 'parsoid' : 'legacy parser' ],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue