Set method visibility for various constructors

Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
This commit is contained in:
Umherirrender 2019-12-01 00:03:59 +01:00
parent c387e77b8e
commit 0688dd7c6d
89 changed files with 93 additions and 89 deletions

View file

@ -61,7 +61,7 @@ class AjaxDispatcher {
* Load up our object with user supplied data
* @param Config $config
*/
function __construct( Config $config ) {
public function __construct( Config $config ) {
$this->config = $config;
$this->mode = "";

View file

@ -80,7 +80,7 @@ class AjaxResponse {
* @param string|null $text
* @param Config|null $config
*/
function __construct( $text = null, Config $config = null ) {
public function __construct( $text = null, Config $config = null ) {
$this->mCacheDuration = null;
$this->mVary = null;
$this->mConfig = $config ?: MediaWikiServices::getInstance()->getMainConfig();

View file

@ -85,7 +85,7 @@ class CategoryViewer extends ContextSource {
* @param array $until An array with 3 keys for until of each section (since 1.17)
* @param array $query
*/
function __construct( $title, IContextSource $context, $from = [],
public function __construct( $title, IContextSource $context, $from = [],
$until = [], $query = []
) {
$this->title = $title;

View file

@ -32,7 +32,7 @@ class DeprecatedGlobal extends StubObject {
* @param callable|string $callback Factory function or class name to construct
* @param bool|string $version Version global was deprecated in
*/
function __construct( $name, $callback, $version = false ) {
public function __construct( $name, $callback, $version = false ) {
parent::__construct( $name, $callback );
$this->version = $version;
}

View file

@ -73,7 +73,7 @@ class ProtectionForm {
/** @var IContextSource */
private $mContext;
function __construct( Article $article ) {
public function __construct( Article $article ) {
// Set instance variables.
$this->mArticle = $article;
$this->mTitle = $article->getTitle();

View file

@ -34,7 +34,7 @@ class TitleArrayFromResult extends TitleArray implements Countable {
public $current;
function __construct( $res ) {
public function __construct( $res ) {
$this->res = $res;
$this->key = 0;
$this->setCurrent( $this->res->current() );

View file

@ -40,7 +40,7 @@
class XmlJsCode {
public $value;
function __construct( $value ) {
public function __construct( $value ) {
$this->value = $value;
}

View file

@ -28,7 +28,7 @@ class ConstantDependency extends CacheDependency {
private $name;
private $value;
function __construct( $name ) {
public function __construct( $name ) {
$this->name = $name;
$this->value = constant( $name );
}

View file

@ -37,7 +37,7 @@ class DependencyWrapper {
* @param CacheDependency|CacheDependency[] $deps A dependency or dependency
* array. All dependencies must be objects implementing CacheDependency.
*/
function __construct( $value = false, $deps = [] ) {
public function __construct( $value = false, $deps = [] ) {
$this->value = $value;
if ( !is_array( $deps ) ) {

View file

@ -40,7 +40,7 @@ class FileDependency extends CacheDependency {
* created. A dependency on an existing file will be triggered when the
* file is changed.
*/
function __construct( $filename, $timestamp = null ) {
public function __construct( $filename, $timestamp = null ) {
$this->filename = $filename;
$this->timestamp = $timestamp;
}

View file

@ -28,7 +28,7 @@ class GlobalDependency extends CacheDependency {
private $name;
private $value;
function __construct( $name ) {
public function __construct( $name ) {
$this->name = $name;
$this->value = $GLOBALS[$name];
}

View file

@ -29,7 +29,7 @@ class MainConfigDependency extends CacheDependency {
private $name;
private $value;
function __construct( $name ) {
public function __construct( $name ) {
$this->name = $name;
$this->value = $this->getConfig()->get( $this->name );
}

View file

@ -45,7 +45,7 @@ class LCStoreCDB implements LCStore {
/** @var string Cache directory */
private $directory;
function __construct( $conf = [] ) {
public function __construct( $conf = [] ) {
$this->directory = $conf['directory'];
}

View file

@ -251,7 +251,7 @@ class LocalisationCache {
* @param LanguageNameUtils $langNameUtils
* @throws MWException
*/
function __construct(
public function __construct(
ServiceOptions $options,
LCStore $store,
LoggerInterface $logger,

View file

@ -39,7 +39,9 @@ abstract class ChannelFeed extends FeedItem {
* @param string $author Author's user name
* @param string $comments
*/
function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) {
public function __construct(
$title, $description, $url, $date = '', $author = '', $comments = ''
) {
parent::__construct( $title, $description, $url, $date, $author, $comments );
$this->templateParser = new TemplateParser();
}

View file

@ -56,7 +56,9 @@ class FeedItem {
* @param string $author Author's user name
* @param string $comments
*/
function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) {
public function __construct(
$title, $description, $url, $date = '', $author = '', $comments = ''
) {
$this->title = $title;
$this->description = $description;
$this->url = $url;

View file

@ -28,7 +28,7 @@
* @method ChangeTagsLogItem current()
*/
abstract class ChangeTagsList extends RevisionListBase {
function __construct( IContextSource $context, Title $title, array $ids ) {
public function __construct( IContextSource $context, Title $title, array $ids ) {
parent::__construct( $context, $title );
$this->ids = $ids;
}

View file

@ -29,7 +29,7 @@ class SquidPurgeClientPool {
/**
* @param array $options
*/
function __construct( $options = [] ) {
public function __construct( $options = [] ) {
if ( isset( $options['timeout'] ) ) {
$this->timeout = $options['timeout'];
}

View file

@ -38,7 +38,7 @@ class HTMLCacheUpdate extends DataUpdate {
* @param string $causeAction Triggering action
* @param string $causeAgent Triggering user
*/
function __construct(
public function __construct(
Title $titleTo, $table, $causeAction = 'unknown', $causeAgent = 'unknown'
) {
$this->title = $titleTo;

View file

@ -37,7 +37,7 @@ class LinksDeletionUpdate extends LinksUpdate implements EnqueueableDataUpdate {
* @param string|null $timestamp TS_MW timestamp of deletion
* @throws MWException
*/
function __construct( WikiPage $page, $pageId = null, $timestamp = null ) {
public function __construct( WikiPage $page, $pageId = null, $timestamp = null ) {
$this->page = $page;
if ( $pageId ) {
$this->mId = $pageId; // page ID at time of deletion

View file

@ -122,7 +122,7 @@ class LinksUpdate extends DataUpdate {
* @param bool $recursive Queue jobs for recursive updates?
* @throws MWException
*/
function __construct( Title $title, ParserOutput $parserOutput, $recursive = true ) {
public function __construct( Title $title, ParserOutput $parserOutput, $recursive = true ) {
parent::__construct();
$this->mTitle = $title;

View file

@ -46,7 +46,7 @@ class SiteStatsUpdate implements DeferrableUpdate, MergeableUpdate {
];
// @todo deprecate this constructor
function __construct( $views, $edits, $good, $pages = 0, $users = 0 ) {
public function __construct( $views, $edits, $good, $pages = 0, $users = 0 ) {
$this->edits = $edits;
$this->articles = $good;
$this->pages = $pages;

View file

@ -69,7 +69,7 @@ class DiffEngine {
public $added;
public $heuristicUsed;
function __construct( $tooLong = 2000000, $powLimit = 1.45 ) {
public function __construct( $tooLong = 2000000, $powLimit = 1.45 ) {
$this->tooLong = $tooLong;
$this->powLimit = $powLimit;
}

View file

@ -49,7 +49,7 @@ class RangeDifference {
/** @var int */
public $rightlength;
function __construct( $leftstart, $leftend, $rightstart, $rightend ) {
public function __construct( $leftstart, $leftend, $rightstart, $rightend ) {
$this->leftstart = $leftstart;
$this->leftend = $leftend;
$this->leftlength = $leftend - $leftstart;

View file

@ -32,7 +32,7 @@
*/
class TableDiffFormatter extends DiffFormatter {
function __construct() {
public function __construct() {
$this->leadingContextLines = 2;
$this->trailingContextLines = 2;
}

View file

@ -12,7 +12,7 @@ class MWUnknownContentModelException extends MWException {
private $modelId;
/** @param string $modelId */
function __construct( $modelId ) {
public function __construct( $modelId ) {
parent::__construct( "The content model '$modelId' is not registered on this wiki.\n" .
'See https://www.mediawiki.org/wiki/Content_handlers to find out which extensions ' .
'handle this content model.' );

View file

@ -38,7 +38,7 @@ class Dump7ZipOutput extends DumpPipeOutput {
* @param string $file
* @param int $cmpLevel Compression level passed to 7za command's -mx
*/
function __construct( $file, $cmpLevel = 4 ) {
public function __construct( $file, $cmpLevel = 4 ) {
$this->compressionLevel = $cmpLevel;
$command = $this->setup7zCommand( $file );
parent::__construct( $command );

View file

@ -30,7 +30,7 @@ class DumpBZip2Output extends DumpPipeOutput {
/**
* @param string $file
*/
function __construct( $file ) {
public function __construct( $file ) {
parent::__construct( "bzip2", $file );
}
}

View file

@ -30,7 +30,7 @@ class DumpDBZip2Output extends DumpPipeOutput {
/**
* @param string $file
*/
function __construct( $file ) {
public function __construct( $file ) {
parent::__construct( "dbzip2", $file );
}
}

View file

@ -35,7 +35,7 @@ class DumpFileOutput extends DumpOutput {
/**
* @param string $file
*/
function __construct( $file ) {
public function __construct( $file ) {
$this->handle = fopen( $file, "wt" );
$this->filename = $file;
}

View file

@ -44,7 +44,7 @@ class DumpFilter {
/**
* @param DumpOutput &$sink
*/
function __construct( &$sink ) {
public function __construct( &$sink ) {
$this->sink =& $sink;
}

View file

@ -30,7 +30,7 @@ class DumpGZipOutput extends DumpPipeOutput {
/**
* @param string $file
*/
function __construct( $file ) {
public function __construct( $file ) {
parent::__construct( "gzip", $file );
}
}

View file

@ -32,7 +32,7 @@ class DumpLBZip2Output extends DumpPipeOutput {
/**
* @param string $file
*/
function __construct( $file ) {
public function __construct( $file ) {
# use only one core
parent::__construct( "lbzip2 -n 1", $file );
}

View file

@ -35,7 +35,7 @@ class DumpMultiWriter {
/**
* @param array $sinks
*/
function __construct( $sinks ) {
public function __construct( $sinks ) {
$this->sinks = $sinks;
$this->count = count( $sinks );
}

View file

@ -38,7 +38,7 @@ class DumpNamespaceFilter extends DumpFilter {
* @param string $param
* @throws MWException
*/
function __construct( &$sink, $param ) {
public function __construct( &$sink, $param ) {
parent::__construct( $sink );
$constants = [

View file

@ -39,7 +39,7 @@ class DumpPipeOutput extends DumpFileOutput {
* @param string $command
* @param string|null $file
*/
function __construct( $command, $file = null ) {
public function __construct( $command, $file = null ) {
if ( !is_null( $file ) ) {
$command .= " > " . Shell::escape( $file );
}

View file

@ -34,7 +34,7 @@ class ExportProgressFilter extends DumpFilter {
* @param DumpOutput &$sink
* @param BackupDumper &$progress
*/
function __construct( &$sink, &$progress ) {
public function __construct( &$sink, &$progress ) {
parent::__construct( $sink );
$this->progress = $progress;
}

View file

@ -97,7 +97,7 @@ class WikiExporter {
* @param null|array $limitNamespaces Comma-separated list of namespace numbers
* to limit results
*/
function __construct(
public function __construct(
$db,
$history = self::CURRENT,
$text = self::TEXT,

View file

@ -29,7 +29,7 @@ class NullRepo extends FileRepo {
/**
* @param array|null $info
*/
function __construct( $info ) {
public function __construct( $info ) {
}
protected function assertWritableRepo() {

View file

@ -59,7 +59,7 @@ class LocalFileDeleteBatch {
* @param bool $suppress
* @param User|null $user
*/
function __construct( File $file, $reason = '', $suppress = false, $user = null ) {
public function __construct( File $file, $reason = '', $suppress = false, $user = null ) {
$this->file = $file;
$this->reason = $reason;
$this->suppress = $suppress;

View file

@ -68,7 +68,7 @@ class LocalFileMoveBatch {
* @param File $file
* @param Title $target
*/
function __construct( File $file, Title $target ) {
public function __construct( File $file, Title $target ) {
$this->file = $file;
$this->target = $target;
$this->oldHash = $this->file->repo->getHashPath( $this->file->getName() );

View file

@ -47,7 +47,7 @@ class LocalFileRestoreBatch {
* @param File $file
* @param bool $unsuppress
*/
function __construct( File $file, $unsuppress = false ) {
public function __construct( File $file, $unsuppress = false ) {
$this->file = $file;
$this->cleanupBatch = [];
$this->ids = [];

View file

@ -153,7 +153,7 @@ abstract class ImageGalleryBase extends ContextSource {
* @param string $mode
* @param IContextSource|null $context
*/
function __construct( $mode = 'traditional', IContextSource $context = null ) {
public function __construct( $mode = 'traditional', IContextSource $context = null ) {
if ( $context ) {
$this->setContext( $context );
}

View file

@ -21,7 +21,7 @@
*/
class PackedImageGallery extends TraditionalImageGallery {
function __construct( $mode = 'traditional', IContextSource $context = null ) {
public function __construct( $mode = 'traditional', IContextSource $context = null ) {
parent::__construct( $mode, $context );
// Does not support per row option.
$this->mPerRow = 0;

View file

@ -21,7 +21,7 @@
*/
class SlideshowImageGallery extends TraditionalImageGallery {
function __construct( $mode = 'traditional', IContextSource $context = null ) {
public function __construct( $mode = 'traditional', IContextSource $context = null ) {
parent::__construct( $mode, $context );
// Does not support per row option.
$this->mPerRow = 0;

View file

@ -68,7 +68,7 @@ class DiffHistoryBlob implements HistoryBlob {
const XDL_BDOP_CPY = 2;
const XDL_BDOP_INSB = 3;
function __construct() {
public function __construct() {
if ( !function_exists( 'gzdeflate' ) ) {
throw new MWException( "Need zlib support to read or write DiffHistoryBlob\n" );
}

View file

@ -35,7 +35,7 @@ class HistoryBlobCurStub {
/**
* @param int $curid The cur_id pointed to
*/
function __construct( $curid = 0 ) {
public function __construct( $curid = 0 ) {
$this->mCurId = $curid;
}

View file

@ -47,7 +47,7 @@ class HistoryBlobStub {
* @param string $hash The content hash of the text
* @param int $oldid The old_id for the CGZ object
*/
function __construct( $hash = '', $oldid = 0 ) {
public function __construct( $hash = '', $oldid = 0 ) {
$this->mHash = $hash;
}

View file

@ -36,7 +36,7 @@ class ImportStreamSource implements ImportSource {
/**
* @param resource $handle
*/
function __construct( $handle ) {
public function __construct( $handle ) {
$this->mHandle = $handle;
}

View file

@ -41,7 +41,7 @@ class ImportStringSource implements ImportSource {
/**
* @param string $string
*/
function __construct( $string ) {
public function __construct( $string ) {
$this->mString = $string;
$this->mRead = false;
}

View file

@ -59,7 +59,7 @@ class WikiImporter {
* @param Config $config
* @throws Exception
*/
function __construct( ImportSource $source, Config $config ) {
public function __construct( ImportSource $source, Config $config ) {
if ( !class_exists( 'XMLReader' ) ) {
throw new Exception( 'Import requires PHP to have been compiled with libxml support' );
}

View file

@ -54,7 +54,7 @@ class CliInstaller extends Installer {
* @param array $options
* @throws InstallException
*/
function __construct( $siteName, $admin = null, array $options = [] ) {
public function __construct( $siteName, $admin = null, array $options = [] ) {
global $wgContLang;
parent::__construct();

View file

@ -104,7 +104,7 @@ class ClassicInterwikiLookup implements InterwikiLookup {
* - 3: site level as well as wiki and global levels
* @param string $fallbackSite The code to assume for the local site,
*/
function __construct(
public function __construct(
Language $contLang,
WANObjectCache $objectCache,
$objectCacheExpiry,

View file

@ -45,7 +45,7 @@ class InterwikiLookupAdapter implements InterwikiLookup {
*/
private $interwikiMap;
function __construct(
public function __construct(
SiteLookup $siteLookup,
array $interwikiMap = null
) {

View file

@ -34,7 +34,7 @@ use MediaWiki\Linker\LinkTarget;
* @since 1.26
*/
class ActivityUpdateJob extends Job {
function __construct( LinkTarget $title, array $params ) {
public function __construct( LinkTarget $title, array $params ) {
$title = Title::newFromLinkTarget( $title );
parent::__construct( 'activityUpdateJob', $title, $params );

View file

@ -28,7 +28,7 @@
* @since 1.27
*/
class CdnPurgeJob extends Job implements GenericParameterJob {
function __construct( array $params ) {
public function __construct( array $params ) {
parent::__construct( 'cdnPurge', $params );
$this->removeDuplicates = false; // delay semantics are critical
}

View file

@ -34,7 +34,7 @@ use MediaWiki\MediaWikiServices;
* @since 1.31
*/
class ClearWatchlistNotificationsJob extends Job implements GenericParameterJob {
function __construct( array $params ) {
public function __construct( array $params ) {
parent::__construct( 'clearWatchlistNotifications', $params );
static $required = [ 'userId', 'casTime' ];

View file

@ -32,7 +32,7 @@ use MediaWiki\MediaWikiServices;
* @since 1.27
*/
class DeleteLinksJob extends Job {
function __construct( Title $title, array $params ) {
public function __construct( Title $title, array $params ) {
parent::__construct( 'deleteLinks', $title, $params );
$this->removeDuplicates = true;
}

View file

@ -47,7 +47,7 @@ class DoubleRedirectJob extends Job {
* "double-redirect-fixed-maintenance".
* ]
*/
function __construct( Title $title, array $params ) {
public function __construct( Title $title, array $params ) {
parent::__construct( 'fixDoubleRedirect', $title, $params );
$this->redirTitle = Title::newFromText( $params['redirTitle'] );
}

View file

@ -32,7 +32,7 @@ final class DuplicateJob extends Job implements GenericParameterJob {
*
* @param array $params Job parameters
*/
function __construct( array $params ) {
public function __construct( array $params ) {
parent::__construct( 'duplicate', $params );
}

View file

@ -28,7 +28,7 @@
* @ingroup JobQueue
*/
class EmaillingJob extends Job {
function __construct( ?Title $title, array $params ) {
public function __construct( ?Title $title, array $params ) {
parent::__construct( 'sendMail', Title::newMainPage(), $params );
}

View file

@ -27,7 +27,7 @@
* @ingroup JobQueue
*/
class EnotifNotifyJob extends Job {
function __construct( Title $title, array $params ) {
public function __construct( Title $title, array $params ) {
parent::__construct( 'enotifNotify', $title, $params );
}

View file

@ -36,7 +36,7 @@ use MediaWiki\MediaWikiServices;
* @ingroup JobQueue
*/
class HTMLCacheUpdateJob extends Job {
function __construct( Title $title, array $params ) {
public function __construct( Title $title, array $params ) {
parent::__construct( 'htmlCacheUpdate', $title, $params );
// Avoid the overhead of de-duplication when it would be pointless.
// Note that these jobs always set page_touched to the current time,

View file

@ -48,7 +48,7 @@ class NullJob extends Job implements GenericParameterJob {
/**
* @param array $params Job parameters (lives, usleep)
*/
function __construct( array $params ) {
public function __construct( array $params ) {
parent::__construct( 'null', $params );
if ( !isset( $this->params['lives'] ) ) {
$this->params['lives'] = 1;

View file

@ -27,7 +27,7 @@ use MediaWiki\MediaWikiServices;
* @since 1.25
*/
class RecentChangesUpdateJob extends Job {
function __construct( Title $title, array $params ) {
public function __construct( Title $title, array $params ) {
parent::__construct( 'recentChangesUpdate', $title, $params );
if ( !isset( $params['type'] ) ) {

View file

@ -44,7 +44,7 @@ class RefreshLinksJob extends Job {
/** @var int How many seconds to wait for replica DBs to catch up */
const LAG_WAIT_TIMEOUT = 15;
function __construct( Title $title, array $params ) {
public function __construct( Title $title, array $params ) {
parent::__construct( 'refreshLinks', $title, $params );
// Avoid the overhead of de-duplication when it would be pointless
$this->removeDuplicates = (

View file

@ -33,7 +33,7 @@ class Cookie {
// TO IMPLEMENT? protected $version
// TO IMPLEMENT? protected $comment
function __construct( $name, $value, $attr ) {
public function __construct( $name, $value, $attr ) {
$this->name = $name;
$this->set( $value, $attr );
}

View file

@ -56,7 +56,7 @@ class FSLockManager extends LockManager {
* @param array $config Includes:
* - lockDirectory : Directory containing the lock files
*/
function __construct( array $config ) {
public function __construct( array $config ) {
parent::__construct( $config );
$this->lockDir = $config['lockDirectory'];

View file

@ -311,7 +311,7 @@ class IEContentAnalyzer {
*/
protected $typeTable = [];
function __construct() {
public function __construct() {
// Construct versioned type arrays from the base type array plus additions
$types = $this->baseTypeTable;
foreach ( $this->versions as $version ) {

View file

@ -107,7 +107,7 @@ class XmlTypeCheck {
* dtd_handler: Callback given the full text of the <!DOCTYPE declaration.
* require_safe_dtd: Only allow non-recursive entities in internal dtd (default true)
*/
function __construct( $input, $filterCallback = null, $isFile = true, $options = [] ) {
public function __construct( $input, $filterCallback = null, $isFile = true, $options = [] ) {
$this->filterCallback = $filterCallback;
$this->parserOptions = array_merge( $this->parserOptions, $options );
$this->validateFromInput( $input, $isFile );

View file

@ -51,7 +51,7 @@ class HashBagOStuff extends MediumSpecificBagOStuff {
* @phan-param array{logger?:Psr\Log\LoggerInterface,asyncHandler?:callable,keyspace?:string,reportDupes?:bool,syncTimeout?:int,segmentationSize?:int,segmentedValueMaxSize?:int,maxKeys?:int} $params
* @codingStandardsIgnoreEnd
*/
function __construct( $params = [] ) {
public function __construct( $params = [] ) {
$params['segmentationSize'] = $params['segmentationSize'] ?? INF;
parent::__construct( $params );

View file

@ -27,7 +27,7 @@
* @ingroup Cache
*/
abstract class MemcachedBagOStuff extends MediumSpecificBagOStuff {
function __construct( array $params ) {
public function __construct( array $params ) {
parent::__construct( $params );
$this->attrMap[self::ATTR_SYNCWRITES] = self::QOS_SYNCWRITES_BE; // unreliable

View file

@ -64,7 +64,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
* - allow_tcp_nagle_delay Whether to permit Nagle's algorithm for reducing packet count
* @param array $params
*/
function __construct( $params ) {
public function __construct( $params ) {
parent::__construct( $params );
// Default class-specific parameters

View file

@ -40,7 +40,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
*
* @param array $params
*/
function __construct( $params ) {
public function __construct( $params ) {
parent::__construct( $params );
// Default class-specific parameters

View file

@ -68,7 +68,7 @@ class RedisBagOStuff extends MediumSpecificBagOStuff {
* flap, for example if it is in swap death.
* @param array $params
*/
function __construct( $params ) {
public function __construct( $params ) {
parent::__construct( $params );
$redisConf = [ 'serializer' => 'none' ]; // manage that in this class
foreach ( [ 'connectTimeout', 'persistent', 'password' ] as $opt ) {

View file

@ -7,7 +7,7 @@ class MySQLField implements Field {
$is_pk, $is_unique, $is_multiple, $is_key, $type, $binary,
$is_numeric, $is_blob, $is_unsigned, $is_zerofill;
function __construct( $info ) {
public function __construct( $info ) {
$this->name = $info->name;
$this->tablename = $info->table;
$this->default = $info->def;

View file

@ -5,7 +5,7 @@ namespace Wikimedia\Rdbms;
class SQLiteField implements Field {
private $info, $tableName;
function __construct( $info, $tableName ) {
public function __construct( $info, $tableName ) {
$this->info = $info;
$this->tableName = $tableName;
}

View file

@ -81,7 +81,7 @@ class PoolCounterRedis extends PoolCounter {
/** @var PoolCounterRedis[] List of active PoolCounterRedis objects in this script */
protected static $active = null;
function __construct( $conf, $type, $key ) {
public function __construct( $conf, $type, $key ) {
parent::__construct( $conf, $type, $key );
$this->serversByLabel = $conf['servers'];

View file

@ -34,7 +34,7 @@ class ProfilerOutputText extends ProfilerOutput {
/** @var bool Whether to use visible text or a comment (for HTML responses) */
private $visible;
function __construct( Profiler $collector, array $params ) {
public function __construct( Profiler $collector, array $params ) {
parent::__construct( $collector, $params );
$this->thresholdMs = $params['thresholdMs'] ?? 1.0;
$this->visible = $params['visible'] ?? false;

View file

@ -34,7 +34,7 @@ use MediaWiki\Revision\RevisionRecord;
* @method RevDelItem current()
*/
abstract class RevDelList extends RevisionListBase {
function __construct( IContextSource $context, Title $title, array $ids ) {
public function __construct( IContextSource $context, Title $title, array $ids ) {
parent::__construct( $context, $title );
$this->ids = $ids;
}

View file

@ -44,7 +44,7 @@ abstract class RevisionListBase extends ContextSource implements Iterator {
* @param IContextSource $context
* @param Title $title
*/
function __construct( IContextSource $context, Title $title ) {
public function __construct( IContextSource $context, Title $title ) {
$this->setContext( $context );
$this->title = $title;
}

View file

@ -39,7 +39,7 @@ class SearchHighlighter {
* the caller is responsible for HTML escaping.
* @param bool $cleanupWikitext
*/
function __construct( $cleanupWikitext = true ) {
public function __construct( $cleanupWikitext = true ) {
$this->mCleanWikitext = $cleanupWikitext;
}

View file

@ -21,7 +21,7 @@ class SqlSearchResultSet extends SearchResultSet {
* @param string[] $terms
* @param int|null $total
*/
function __construct( IResultWrapper $resultSet, array $terms, $total = null ) {
public function __construct( IResultWrapper $resultSet, array $terms, $total = null ) {
parent::__construct();
$this->resultSet = $resultSet;
$this->terms = $terms;

View file

@ -17,7 +17,7 @@ class SessionOverflowException extends \OverflowException {
* @param string $msg
* @throws \InvalidArgumentException If $sessionInfos has less than 2 elements
*/
function __construct( array $sessionInfos, $msg ) {
public function __construct( array $sessionInfos, $msg ) {
if ( count( $sessionInfos ) < 2 ) {
throw new \InvalidArgumentException( 'Expected at least two SessionInfo objects.' );
}

View file

@ -37,7 +37,7 @@ abstract class QuickTemplate {
/**
* @param Config|null $config
*/
function __construct( Config $config = null ) {
public function __construct( Config $config = null ) {
$this->data = [];
if ( $config === null ) {
wfDebug( __METHOD__ . ' was called with no Config instance passed to it' );

View file

@ -27,7 +27,7 @@
* @ingroup SpecialPage
*/
class UnlistedSpecialPage extends SpecialPage {
function __construct( $name, $restriction = '', $function = false, $file = 'default' ) {
public function __construct( $name, $restriction = '', $function = false, $file = 'default' ) {
parent::__construct( $name, $restriction, false, $function, $file );
}

View file

@ -8,7 +8,7 @@ namespace MediaWiki\Tidy;
abstract class TidyDriverBase {
protected $config;
function __construct( $config ) {
public function __construct( $config ) {
$this->config = $config;
}

View file

@ -35,7 +35,7 @@ class UserArrayFromResult extends UserArray implements Countable {
/**
* @param IResultWrapper $res
*/
function __construct( $res ) {
public function __construct( $res ) {
$this->res = $res;
$this->key = 0;
$this->setCurrent( $this->res->current() );

View file

@ -24,7 +24,7 @@
class ZipDirectoryReaderError extends Exception {
protected $errorCode;
function __construct( $code ) {
public function __construct( $code ) {
$this->errorCode = $code;
parent::__construct( "ZipDirectoryReader error: $code" );
}