From 2491edaaca70c5a9bc898e5186eaf2c27719988f Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Thu, 20 Dec 2018 18:29:37 +0100 Subject: [PATCH] Mark constructors of IndexPager subclasses as public I believe this is uncontroversial. The constructor or the top-level base class is public. Subclasses are not even allowed to change that. So what this patch effectively does is basically documentation, but it does not change anything. Change-Id: Icd5da81de284bc4bf382bfdfd33dab428f1fab09 --- includes/actions/HistoryAction.php | 8 +++++++- includes/specials/pagers/ActiveUsersPager.php | 2 +- includes/specials/pagers/AllMessagesTablePager.php | 2 +- includes/specials/pagers/BlockListPager.php | 2 +- includes/specials/pagers/ContribsPager.php | 2 +- includes/specials/pagers/DeletedContribsPager.php | 2 +- includes/specials/pagers/ImageListPager.php | 2 +- includes/specials/pagers/MergeHistoryPager.php | 2 +- includes/specials/pagers/NewFilesPager.php | 2 +- includes/specials/pagers/NewPagesPager.php | 2 +- includes/specials/pagers/ProtectedPagesPager.php | 2 +- includes/specials/pagers/ProtectedTitlesPager.php | 2 +- includes/specials/pagers/UsersPager.php | 2 +- 13 files changed, 19 insertions(+), 13 deletions(-) diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 7d6b548b0f..8309e67691 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -415,7 +415,13 @@ class HistoryPager extends ReverseChronologicalPager { * @param string $tagFilter * @param array $conds */ - function __construct( $historyPage, $year = '', $month = '', $tagFilter = '', $conds = [] ) { + public function __construct( + HistoryAction $historyPage, + $year = '', + $month = '', + $tagFilter = '', + array $conds = [] + ) { parent::__construct( $historyPage->getContext() ); $this->historyPage = $historyPage; $this->tagFilter = $tagFilter; diff --git a/includes/specials/pagers/ActiveUsersPager.php b/includes/specials/pagers/ActiveUsersPager.php index 552e92fb00..b2b7424a40 100644 --- a/includes/specials/pagers/ActiveUsersPager.php +++ b/includes/specials/pagers/ActiveUsersPager.php @@ -47,7 +47,7 @@ class ActiveUsersPager extends UsersPager { * @param IContextSource|null $context * @param FormOptions $opts */ - function __construct( IContextSource $context = null, FormOptions $opts ) { + public function __construct( IContextSource $context = null, FormOptions $opts ) { parent::__construct( $context ); $this->RCMaxAge = $this->getConfig()->get( 'ActiveUserDays' ); diff --git a/includes/specials/pagers/AllMessagesTablePager.php b/includes/specials/pagers/AllMessagesTablePager.php index 6d5f64b7a2..cbcff5a320 100644 --- a/includes/specials/pagers/AllMessagesTablePager.php +++ b/includes/specials/pagers/AllMessagesTablePager.php @@ -44,7 +44,7 @@ class AllMessagesTablePager extends TablePager { */ public $custom; - function __construct( $page, $conds, Language $langObj = null ) { + public function __construct( $page, $conds, Language $langObj = null ) { parent::__construct( $page->getContext() ); $this->mIndexField = 'am_title'; $this->mPage = $page; diff --git a/includes/specials/pagers/BlockListPager.php b/includes/specials/pagers/BlockListPager.php index 74ec6b55d3..3d8c71ff4a 100644 --- a/includes/specials/pagers/BlockListPager.php +++ b/includes/specials/pagers/BlockListPager.php @@ -43,7 +43,7 @@ class BlockListPager extends TablePager { * @param SpecialPage $page * @param array $conds */ - function __construct( $page, $conds ) { + public function __construct( $page, $conds ) { $this->page = $page; $this->conds = $conds; $this->mDefaultDirection = IndexPager::DIR_DESCENDING; diff --git a/includes/specials/pagers/ContribsPager.php b/includes/specials/pagers/ContribsPager.php index 18da235fde..2fe232ef70 100644 --- a/includes/specials/pagers/ContribsPager.php +++ b/includes/specials/pagers/ContribsPager.php @@ -50,7 +50,7 @@ class ContribsPager extends RangeChronologicalPager { */ protected $templateParser; - function __construct( IContextSource $context, array $options ) { + public function __construct( IContextSource $context, array $options ) { parent::__construct( $context ); $msgs = [ diff --git a/includes/specials/pagers/DeletedContribsPager.php b/includes/specials/pagers/DeletedContribsPager.php index ee7eb3e4d8..5150ab91fc 100644 --- a/includes/specials/pagers/DeletedContribsPager.php +++ b/includes/specials/pagers/DeletedContribsPager.php @@ -40,7 +40,7 @@ class DeletedContribsPager extends IndexPager { */ protected $mNavigationBar; - function __construct( IContextSource $context, $target, $namespace = false ) { + public function __construct( IContextSource $context, $target, $namespace = false ) { parent::__construct( $context ); $msgs = [ 'deletionlog', 'undeleteviewlink', 'diff' ]; foreach ( $msgs as $msg ) { diff --git a/includes/specials/pagers/ImageListPager.php b/includes/specials/pagers/ImageListPager.php index 889ec1af7c..861011eb54 100644 --- a/includes/specials/pagers/ImageListPager.php +++ b/includes/specials/pagers/ImageListPager.php @@ -50,7 +50,7 @@ class ImageListPager extends TablePager { protected $mTableName = 'image'; - function __construct( IContextSource $context, $userName = null, $search = '', + public function __construct( IContextSource $context, $userName = null, $search = '', $including = false, $showAll = false ) { $this->setContext( $context ); diff --git a/includes/specials/pagers/MergeHistoryPager.php b/includes/specials/pagers/MergeHistoryPager.php index 6a8f7da74e..efe72c7fa3 100644 --- a/includes/specials/pagers/MergeHistoryPager.php +++ b/includes/specials/pagers/MergeHistoryPager.php @@ -30,7 +30,7 @@ class MergeHistoryPager extends ReverseChronologicalPager { /** @var array */ public $mConds; - function __construct( SpecialMergeHistory $form, $conds, Title $source, Title $dest ) { + public function __construct( SpecialMergeHistory $form, $conds, Title $source, Title $dest ) { $this->mForm = $form; $this->mConds = $conds; $this->title = $source; diff --git a/includes/specials/pagers/NewFilesPager.php b/includes/specials/pagers/NewFilesPager.php index 6b7e4b8b31..6ed72db646 100644 --- a/includes/specials/pagers/NewFilesPager.php +++ b/includes/specials/pagers/NewFilesPager.php @@ -40,7 +40,7 @@ class NewFilesPager extends RangeChronologicalPager { * @param IContextSource $context * @param FormOptions $opts */ - function __construct( IContextSource $context, FormOptions $opts ) { + public function __construct( IContextSource $context, FormOptions $opts ) { parent::__construct( $context ); $this->opts = $opts; diff --git a/includes/specials/pagers/NewPagesPager.php b/includes/specials/pagers/NewPagesPager.php index f16a5cb615..2f51751329 100644 --- a/includes/specials/pagers/NewPagesPager.php +++ b/includes/specials/pagers/NewPagesPager.php @@ -32,7 +32,7 @@ class NewPagesPager extends ReverseChronologicalPager { */ protected $mForm; - function __construct( $form, FormOptions $opts ) { + public function __construct( $form, FormOptions $opts ) { parent::__construct( $form->getContext() ); $this->mForm = $form; $this->opts = $opts; diff --git a/includes/specials/pagers/ProtectedPagesPager.php b/includes/specials/pagers/ProtectedPagesPager.php index 3e97923faf..f457d2f1e5 100644 --- a/includes/specials/pagers/ProtectedPagesPager.php +++ b/includes/specials/pagers/ProtectedPagesPager.php @@ -44,7 +44,7 @@ class ProtectedPagesPager extends TablePager { * @param bool $noredirect * @param LinkRenderer $linkRenderer */ - function __construct( $form, $conds, $type, $level, $namespace, + public function __construct( $form, $conds, $type, $level, $namespace, $sizetype, $size, $indefonly, $cascadeonly, $noredirect, LinkRenderer $linkRenderer ) { diff --git a/includes/specials/pagers/ProtectedTitlesPager.php b/includes/specials/pagers/ProtectedTitlesPager.php index ed437be5ab..bde3d98b5f 100644 --- a/includes/specials/pagers/ProtectedTitlesPager.php +++ b/includes/specials/pagers/ProtectedTitlesPager.php @@ -26,7 +26,7 @@ class ProtectedTitlesPager extends AlphabeticPager { public $mForm, $mConds; - function __construct( $form, $conds, $type, $level, $namespace, + public function __construct( $form, $conds, $type, $level, $namespace, $sizetype = '', $size = 0 ) { $this->mForm = $form; diff --git a/includes/specials/pagers/UsersPager.php b/includes/specials/pagers/UsersPager.php index bc24d26a16..45b1a33e45 100644 --- a/includes/specials/pagers/UsersPager.php +++ b/includes/specials/pagers/UsersPager.php @@ -43,7 +43,7 @@ class UsersPager extends AlphabeticPager { * @param bool|null $including Whether this page is being transcluded in * another page */ - function __construct( IContextSource $context = null, $par = null, $including = null ) { + public function __construct( IContextSource $context = null, $par = null, $including = null ) { if ( $context ) { $this->setContext( $context ); } -- 2.20.1