Mark constructors of IndexPager subclasses as public
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Thu, 20 Dec 2018 17:29:37 +0000 (18:29 +0100)
committerThiemo Kreuz (WMDE) <thiemo.kreuz@wikimedia.de>
Thu, 20 Dec 2018 18:33:40 +0000 (18:33 +0000)
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

13 files changed:
includes/actions/HistoryAction.php
includes/specials/pagers/ActiveUsersPager.php
includes/specials/pagers/AllMessagesTablePager.php
includes/specials/pagers/BlockListPager.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/DeletedContribsPager.php
includes/specials/pagers/ImageListPager.php
includes/specials/pagers/MergeHistoryPager.php
includes/specials/pagers/NewFilesPager.php
includes/specials/pagers/NewPagesPager.php
includes/specials/pagers/ProtectedPagesPager.php
includes/specials/pagers/ProtectedTitlesPager.php
includes/specials/pagers/UsersPager.php

index 7d6b548..8309e67 100644 (file)
@@ -415,7 +415,13 @@ class HistoryPager extends ReverseChronologicalPager {
         * @param string $tagFilter
         * @param array $conds
         */
         * @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;
                parent::__construct( $historyPage->getContext() );
                $this->historyPage = $historyPage;
                $this->tagFilter = $tagFilter;
index 552e92f..b2b7424 100644 (file)
@@ -47,7 +47,7 @@ class ActiveUsersPager extends UsersPager {
         * @param IContextSource|null $context
         * @param FormOptions $opts
         */
         * @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' );
                parent::__construct( $context );
 
                $this->RCMaxAge = $this->getConfig()->get( 'ActiveUserDays' );
index 6d5f64b..cbcff5a 100644 (file)
@@ -44,7 +44,7 @@ class AllMessagesTablePager extends TablePager {
         */
        public $custom;
 
         */
        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;
                parent::__construct( $page->getContext() );
                $this->mIndexField = 'am_title';
                $this->mPage = $page;
index 74ec6b5..3d8c71f 100644 (file)
@@ -43,7 +43,7 @@ class BlockListPager extends TablePager {
         * @param SpecialPage $page
         * @param array $conds
         */
         * @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;
                $this->page = $page;
                $this->conds = $conds;
                $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
index 18da235..2fe232e 100644 (file)
@@ -50,7 +50,7 @@ class ContribsPager extends RangeChronologicalPager {
         */
        protected $templateParser;
 
         */
        protected $templateParser;
 
-       function __construct( IContextSource $context, array $options ) {
+       public function __construct( IContextSource $context, array $options ) {
                parent::__construct( $context );
 
                $msgs = [
                parent::__construct( $context );
 
                $msgs = [
index ee7eb3e..5150ab9 100644 (file)
@@ -40,7 +40,7 @@ class DeletedContribsPager extends IndexPager {
         */
        protected $mNavigationBar;
 
         */
        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 ) {
                parent::__construct( $context );
                $msgs = [ 'deletionlog', 'undeleteviewlink', 'diff' ];
                foreach ( $msgs as $msg ) {
index 889ec1a..861011e 100644 (file)
@@ -50,7 +50,7 @@ class ImageListPager extends TablePager {
 
        protected $mTableName = 'image';
 
 
        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 );
                $including = false, $showAll = false
        ) {
                $this->setContext( $context );
index 6a8f7da..efe72c7 100644 (file)
@@ -30,7 +30,7 @@ class MergeHistoryPager extends ReverseChronologicalPager {
        /** @var array */
        public $mConds;
 
        /** @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;
                $this->mForm = $form;
                $this->mConds = $conds;
                $this->title = $source;
index 6b7e4b8..6ed72db 100644 (file)
@@ -40,7 +40,7 @@ class NewFilesPager extends RangeChronologicalPager {
         * @param IContextSource $context
         * @param FormOptions $opts
         */
         * @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;
                parent::__construct( $context );
 
                $this->opts = $opts;
index f16a5cb..2f51751 100644 (file)
@@ -32,7 +32,7 @@ class NewPagesPager extends ReverseChronologicalPager {
         */
        protected $mForm;
 
         */
        protected $mForm;
 
-       function __construct( $form, FormOptions $opts ) {
+       public function __construct( $form, FormOptions $opts ) {
                parent::__construct( $form->getContext() );
                $this->mForm = $form;
                $this->opts = $opts;
                parent::__construct( $form->getContext() );
                $this->mForm = $form;
                $this->opts = $opts;
index 3e97923..f457d2f 100644 (file)
@@ -44,7 +44,7 @@ class ProtectedPagesPager extends TablePager {
         * @param bool $noredirect
         * @param LinkRenderer $linkRenderer
         */
         * @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
        ) {
                $sizetype, $size, $indefonly, $cascadeonly, $noredirect,
                LinkRenderer $linkRenderer
        ) {
index ed437be..bde3d98 100644 (file)
@@ -26,7 +26,7 @@ class ProtectedTitlesPager extends AlphabeticPager {
 
        public $mForm, $mConds;
 
 
        public $mForm, $mConds;
 
-       function __construct( $form, $conds, $type, $level, $namespace,
+       public function __construct( $form, $conds, $type, $level, $namespace,
                $sizetype = '', $size = 0
        ) {
                $this->mForm = $form;
                $sizetype = '', $size = 0
        ) {
                $this->mForm = $form;
index bc24d26..45b1a33 100644 (file)
@@ -43,7 +43,7 @@ class UsersPager extends AlphabeticPager {
         * @param bool|null $including Whether this page is being transcluded in
         * another page
         */
         * @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 );
                }
                if ( $context ) {
                        $this->setContext( $context );
                }