Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/136157

Change subject: Revert "Use precise ApiMain/ApiQuery type hints in all API 
modules"
......................................................................

Revert "Use precise ApiMain/ApiQuery type hints in all API modules"

This reverts commit 23632a4ecddd5c6f181807ce776d3be1e1848a71.

Change-Id: Ie4c1e3447eb65c0d29c8be83822d01bc1f1c08fb
---
M includes/api/ApiFormatBase.php
M includes/api/ApiFormatJson.php
M includes/api/ApiFormatRaw.php
M includes/api/ApiLogin.php
M includes/api/ApiModuleManager.php
M includes/api/ApiPageSet.php
M includes/api/ApiParamInfo.php
M includes/api/ApiQuery.php
M includes/api/ApiQueryAllCategories.php
M includes/api/ApiQueryAllImages.php
M includes/api/ApiQueryAllLinks.php
M includes/api/ApiQueryAllMessages.php
M includes/api/ApiQueryAllPages.php
M includes/api/ApiQueryAllUsers.php
M includes/api/ApiQueryBacklinks.php
M includes/api/ApiQueryBase.php
M includes/api/ApiQueryBlocks.php
M includes/api/ApiQueryCategories.php
M includes/api/ApiQueryCategoryInfo.php
M includes/api/ApiQueryCategoryMembers.php
M includes/api/ApiQueryContributors.php
M includes/api/ApiQueryDeletedrevs.php
M includes/api/ApiQueryDuplicateFiles.php
M includes/api/ApiQueryExtLinksUsage.php
M includes/api/ApiQueryExternalLinks.php
M includes/api/ApiQueryFileRepoInfo.php
M includes/api/ApiQueryFilearchive.php
M includes/api/ApiQueryIWBacklinks.php
M includes/api/ApiQueryIWLinks.php
M includes/api/ApiQueryImageInfo.php
M includes/api/ApiQueryImages.php
M includes/api/ApiQueryInfo.php
M includes/api/ApiQueryLangBacklinks.php
M includes/api/ApiQueryLangLinks.php
M includes/api/ApiQueryLinks.php
M includes/api/ApiQueryLogEvents.php
M includes/api/ApiQueryPagePropNames.php
M includes/api/ApiQueryPageProps.php
M includes/api/ApiQueryPagesWithProp.php
M includes/api/ApiQueryProtectedTitles.php
M includes/api/ApiQueryQueryPage.php
M includes/api/ApiQueryRandom.php
M includes/api/ApiQueryRecentChanges.php
M includes/api/ApiQueryRedirects.php
M includes/api/ApiQueryRevisions.php
M includes/api/ApiQuerySearch.php
M includes/api/ApiQuerySiteinfo.php
M includes/api/ApiQueryStashImageInfo.php
M includes/api/ApiQueryTags.php
M includes/api/ApiQueryUserContributions.php
M includes/api/ApiQueryUserInfo.php
M includes/api/ApiQueryUsers.php
M includes/api/ApiQueryWatchlist.php
M includes/api/ApiQueryWatchlistRaw.php
M includes/api/ApiResult.php
M includes/api/ApiRsd.php
M tests/phpunit/includes/api/PrefixUniquenessTest.php
57 files changed, 65 insertions(+), 73 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/136157/1

diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index 8954abc..15b97d8 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -34,11 +34,12 @@
        private $mBufferResult = false, $mBuffer, $mDisabled = false;
 
        /**
+        * Constructor
         * If $format ends with 'fm', pretty-print the output in HTML.
         * @param ApiMain $main
         * @param string $format Format name
         */
-       public function __construct( ApiMain $main, $format ) {
+       public function __construct( $main, $format ) {
                parent::__construct( $main, $format );
 
                $this->mIsHtml = ( substr( $format, -2, 2 ) === 'fm' ); // ends 
with 'fm'
@@ -346,7 +347,7 @@
  */
 class ApiFormatFeedWrapper extends ApiFormatBase {
 
-       public function __construct( ApiMain $main ) {
+       public function __construct( $main ) {
                parent::__construct( $main, 'feed' );
        }
 
diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php
index e2c6b9a..be0b58b 100644
--- a/includes/api/ApiFormatJson.php
+++ b/includes/api/ApiFormatJson.php
@@ -32,7 +32,7 @@
 
        private $mIsRaw;
 
-       public function __construct( ApiMain $main, $format ) {
+       public function __construct( $main, $format ) {
                parent::__construct( $main, $format );
                $this->mIsRaw = ( $format === 'rawfm' );
        }
diff --git a/includes/api/ApiFormatRaw.php b/includes/api/ApiFormatRaw.php
index 3f5c8b7..af17554 100644
--- a/includes/api/ApiFormatRaw.php
+++ b/includes/api/ApiFormatRaw.php
@@ -31,10 +31,11 @@
 class ApiFormatRaw extends ApiFormatBase {
 
        /**
+        * Constructor
         * @param ApiMain $main
-        * @param ApiFormatBase $errorFallback Object to fall back on for errors
+        * @param ApiFormatBase $errorFallback ApiFormatBase object to fall 
back on for errors
         */
-       public function __construct( ApiMain $main, ApiFormatBase 
$errorFallback ) {
+       public function __construct( $main, $errorFallback ) {
                parent::__construct( $main, 'raw' );
                $this->mErrorFallback = $errorFallback;
        }
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 6336e81..46e2a53 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -32,7 +32,7 @@
  */
 class ApiLogin extends ApiBase {
 
-       public function __construct( ApiMain $main, $action ) {
+       public function __construct( $main, $action ) {
                parent::__construct( $main, $action, 'lg' );
        }
 
diff --git a/includes/api/ApiModuleManager.php 
b/includes/api/ApiModuleManager.php
index 8226529..935fa42 100644
--- a/includes/api/ApiModuleManager.php
+++ b/includes/api/ApiModuleManager.php
@@ -33,21 +33,9 @@
  */
 class ApiModuleManager extends ContextSource {
 
-       /**
-        * @var ApiBase
-        */
        private $mParent;
-       /**
-        * @var ApiBase[]
-        */
        private $mInstances = array();
-       /**
-        * @var null[]
-        */
        private $mGroups = array();
-       /**
-        * @var array[]
-        */
        private $mModules = array();
 
        /**
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index 20444d0..804a857 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -98,6 +98,7 @@
        }
 
        /**
+        * Constructor
         * @param ApiBase $dbSource Module implementing getDB().
         *        Allows PageSet to reuse existing db connection from the 
shared state like ApiQuery.
         * @param int $flags Zero or more flags like DISABLE_GENERATORS
diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php
index 622e3a6..7f9ad4c 100644
--- a/includes/api/ApiParamInfo.php
+++ b/includes/api/ApiParamInfo.php
@@ -34,7 +34,7 @@
         */
        protected $queryObj;
 
-       public function __construct( ApiMain $main, $action ) {
+       public function __construct( $main, $action ) {
                parent::__construct( $main, $action );
                $this->queryObj = new ApiQuery( $this->getMain(), 'query' );
        }
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index fc115b8..d1bddbf 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -125,7 +125,7 @@
         * @param ApiMain $main
         * @param string $action
         */
-       public function __construct( ApiMain $main, $action ) {
+       public function __construct( $main, $action ) {
                parent::__construct( $main, $action );
 
                $this->mModuleMgr = new ApiModuleManager( $this );
diff --git a/includes/api/ApiQueryAllCategories.php 
b/includes/api/ApiQueryAllCategories.php
index 1b65097..38ec127 100644
--- a/includes/api/ApiQueryAllCategories.php
+++ b/includes/api/ApiQueryAllCategories.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryAllCategories extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ac' );
        }
 
diff --git a/includes/api/ApiQueryAllImages.php 
b/includes/api/ApiQueryAllImages.php
index 4266a8e..669351f 100644
--- a/includes/api/ApiQueryAllImages.php
+++ b/includes/api/ApiQueryAllImages.php
@@ -34,7 +34,7 @@
 class ApiQueryAllImages extends ApiQueryGeneratorBase {
        protected $mRepo;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ai' );
                $this->mRepo = RepoGroup::singleton()->getLocalRepo();
        }
diff --git a/includes/api/ApiQueryAllLinks.php 
b/includes/api/ApiQueryAllLinks.php
index 61bc90e..9324acb 100644
--- a/includes/api/ApiQueryAllLinks.php
+++ b/includes/api/ApiQueryAllLinks.php
@@ -39,7 +39,7 @@
        private $useIndex = null;
        private $props = array(), $propHelp = array();
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                switch ( $moduleName ) {
                        case 'alllinks':
                                $prefix = 'al';
diff --git a/includes/api/ApiQueryAllMessages.php 
b/includes/api/ApiQueryAllMessages.php
index 8d4af0b..09f40fd 100644
--- a/includes/api/ApiQueryAllMessages.php
+++ b/includes/api/ApiQueryAllMessages.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryAllMessages extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'am' );
        }
 
diff --git a/includes/api/ApiQueryAllPages.php 
b/includes/api/ApiQueryAllPages.php
index b283177..4ac9485 100644
--- a/includes/api/ApiQueryAllPages.php
+++ b/includes/api/ApiQueryAllPages.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryAllPages extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ap' );
        }
 
diff --git a/includes/api/ApiQueryAllUsers.php 
b/includes/api/ApiQueryAllUsers.php
index 42464ef..df8db16 100644
--- a/includes/api/ApiQueryAllUsers.php
+++ b/includes/api/ApiQueryAllUsers.php
@@ -30,7 +30,7 @@
  * @ingroup API
  */
 class ApiQueryAllUsers extends ApiQueryBase {
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'au' );
        }
 
diff --git a/includes/api/ApiQueryBacklinks.php 
b/includes/api/ApiQueryBacklinks.php
index 8dc2a65..524dda4 100644
--- a/includes/api/ApiQueryBacklinks.php
+++ b/includes/api/ApiQueryBacklinks.php
@@ -75,7 +75,7 @@
                )
        );
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                $settings = $this->backlinksSettings[$moduleName];
                $prefix = $settings['prefix'];
                $code = $settings['code'];
diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php
index 01384c0..eac25e6 100644
--- a/includes/api/ApiQueryBase.php
+++ b/includes/api/ApiQueryBase.php
@@ -36,13 +36,13 @@
        private $mQueryModule, $mDb, $tables, $where, $fields, $options, 
$join_conds;
 
        /**
-        * @param ApiQuery $queryModule
+        * @param ApiBase $query
         * @param string $moduleName
         * @param string $paramPrefix
         */
-       public function __construct( ApiQuery $queryModule, $moduleName, 
$paramPrefix = '' ) {
-               parent::__construct( $queryModule->getMain(), $moduleName, 
$paramPrefix );
-               $this->mQueryModule = $queryModule;
+       public function __construct( ApiBase $query, $moduleName, $paramPrefix 
= '' ) {
+               parent::__construct( $query->getMain(), $moduleName, 
$paramPrefix );
+               $this->mQueryModule = $query;
                $this->mDb = null;
                $this->resetQueryParams();
        }
diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php
index 7d27a64..f69b310 100644
--- a/includes/api/ApiQueryBlocks.php
+++ b/includes/api/ApiQueryBlocks.php
@@ -36,7 +36,7 @@
         */
        protected $usernames;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'bk' );
        }
 
diff --git a/includes/api/ApiQueryCategories.php 
b/includes/api/ApiQueryCategories.php
index cfc76e6..90e8ed7 100644
--- a/includes/api/ApiQueryCategories.php
+++ b/includes/api/ApiQueryCategories.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryCategories extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'cl' );
        }
 
diff --git a/includes/api/ApiQueryCategoryInfo.php 
b/includes/api/ApiQueryCategoryInfo.php
index 8097b7b..d0e3a36 100644
--- a/includes/api/ApiQueryCategoryInfo.php
+++ b/includes/api/ApiQueryCategoryInfo.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryCategoryInfo extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ci' );
        }
 
diff --git a/includes/api/ApiQueryCategoryMembers.php 
b/includes/api/ApiQueryCategoryMembers.php
index a3bc3b9..14c2f81 100644
--- a/includes/api/ApiQueryCategoryMembers.php
+++ b/includes/api/ApiQueryCategoryMembers.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'cm' );
        }
 
diff --git a/includes/api/ApiQueryContributors.php 
b/includes/api/ApiQueryContributors.php
index b90283f..912ac02 100644
--- a/includes/api/ApiQueryContributors.php
+++ b/includes/api/ApiQueryContributors.php
@@ -38,7 +38,7 @@
         */
        const MAX_PAGES = 100;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                // "pc" is short for "page contributors", "co" was already 
taken by the
                // GeoData extension's prop=coordinates.
                parent::__construct( $query, $moduleName, 'pc' );
diff --git a/includes/api/ApiQueryDeletedrevs.php 
b/includes/api/ApiQueryDeletedrevs.php
index af0d938..2ca93f5 100644
--- a/includes/api/ApiQueryDeletedrevs.php
+++ b/includes/api/ApiQueryDeletedrevs.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryDeletedrevs extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'dr' );
        }
 
diff --git a/includes/api/ApiQueryDuplicateFiles.php 
b/includes/api/ApiQueryDuplicateFiles.php
index 4645402..3105f91 100644
--- a/includes/api/ApiQueryDuplicateFiles.php
+++ b/includes/api/ApiQueryDuplicateFiles.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'df' );
        }
 
diff --git a/includes/api/ApiQueryExtLinksUsage.php 
b/includes/api/ApiQueryExtLinksUsage.php
index 070681c..da095e6 100644
--- a/includes/api/ApiQueryExtLinksUsage.php
+++ b/includes/api/ApiQueryExtLinksUsage.php
@@ -29,7 +29,7 @@
  */
 class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'eu' );
        }
 
diff --git a/includes/api/ApiQueryExternalLinks.php 
b/includes/api/ApiQueryExternalLinks.php
index e3a7be3..f7a0958 100644
--- a/includes/api/ApiQueryExternalLinks.php
+++ b/includes/api/ApiQueryExternalLinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryExternalLinks extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'el' );
        }
 
diff --git a/includes/api/ApiQueryFileRepoInfo.php 
b/includes/api/ApiQueryFileRepoInfo.php
index d1600ef..d9579a1 100644
--- a/includes/api/ApiQueryFileRepoInfo.php
+++ b/includes/api/ApiQueryFileRepoInfo.php
@@ -29,7 +29,7 @@
  */
 class ApiQueryFileRepoInfo extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'fri' );
        }
 
diff --git a/includes/api/ApiQueryFilearchive.php 
b/includes/api/ApiQueryFilearchive.php
index 97918e3..e12d927 100644
--- a/includes/api/ApiQueryFilearchive.php
+++ b/includes/api/ApiQueryFilearchive.php
@@ -33,7 +33,7 @@
  */
 class ApiQueryFilearchive extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'fa' );
        }
 
diff --git a/includes/api/ApiQueryIWBacklinks.php 
b/includes/api/ApiQueryIWBacklinks.php
index 35b2b40..ec5453c 100644
--- a/includes/api/ApiQueryIWBacklinks.php
+++ b/includes/api/ApiQueryIWBacklinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'iwbl' );
        }
 
diff --git a/includes/api/ApiQueryIWLinks.php b/includes/api/ApiQueryIWLinks.php
index f38a7b1..a7b69a0 100644
--- a/includes/api/ApiQueryIWLinks.php
+++ b/includes/api/ApiQueryIWLinks.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryIWLinks extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'iw' );
        }
 
diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index 5a82f19..5c410a4 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -33,7 +33,7 @@
        const TRANSFORM_LIMIT = 50;
        private static $transformCount = 0;
 
-       public function __construct( ApiQuery $query, $moduleName, $prefix = 
'ii' ) {
+       public function __construct( $query, $moduleName, $prefix = 'ii' ) {
                // We allow a subclass to override the prefix, to create a 
related API
                // module. Some other parts of MediaWiki construct this with a 
null
                // $prefix, which used to be ignored when this only took two 
arguments
diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php
index 87b0778..032050e 100644
--- a/includes/api/ApiQueryImages.php
+++ b/includes/api/ApiQueryImages.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryImages extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'im' );
        }
 
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index f160791..7a70299 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -48,7 +48,7 @@
 
        private $tokenFunctions;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'in' );
        }
 
diff --git a/includes/api/ApiQueryLangBacklinks.php 
b/includes/api/ApiQueryLangBacklinks.php
index 13711e6..5f28654 100644
--- a/includes/api/ApiQueryLangBacklinks.php
+++ b/includes/api/ApiQueryLangBacklinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'lbl' );
        }
 
diff --git a/includes/api/ApiQueryLangLinks.php 
b/includes/api/ApiQueryLangLinks.php
index 53cfba1..8e155f2 100644
--- a/includes/api/ApiQueryLangLinks.php
+++ b/includes/api/ApiQueryLangLinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryLangLinks extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'll' );
        }
 
diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php
index 7c17938..dd816cf 100644
--- a/includes/api/ApiQueryLinks.php
+++ b/includes/api/ApiQueryLinks.php
@@ -36,7 +36,7 @@
 
        private $table, $prefix, $description, $helpUrl;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                switch ( $moduleName ) {
                        case self::LINKS:
                                $this->table = 'pagelinks';
diff --git a/includes/api/ApiQueryLogEvents.php 
b/includes/api/ApiQueryLogEvents.php
index 2d9d710..c48fb43 100644
--- a/includes/api/ApiQueryLogEvents.php
+++ b/includes/api/ApiQueryLogEvents.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryLogEvents extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'le' );
        }
 
diff --git a/includes/api/ApiQueryPagePropNames.php 
b/includes/api/ApiQueryPagePropNames.php
index 8cd9c6c..c387475 100644
--- a/includes/api/ApiQueryPagePropNames.php
+++ b/includes/api/ApiQueryPagePropNames.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryPagePropNames extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ppn' );
        }
 
diff --git a/includes/api/ApiQueryPageProps.php 
b/includes/api/ApiQueryPageProps.php
index e370c39..b68a385 100644
--- a/includes/api/ApiQueryPageProps.php
+++ b/includes/api/ApiQueryPageProps.php
@@ -33,7 +33,7 @@
 
        private $params;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'pp' );
        }
 
diff --git a/includes/api/ApiQueryPagesWithProp.php 
b/includes/api/ApiQueryPagesWithProp.php
index b6c8525..4381485 100644
--- a/includes/api/ApiQueryPagesWithProp.php
+++ b/includes/api/ApiQueryPagesWithProp.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'pwp' );
        }
 
diff --git a/includes/api/ApiQueryProtectedTitles.php 
b/includes/api/ApiQueryProtectedTitles.php
index 8f120c6..368705d 100644
--- a/includes/api/ApiQueryProtectedTitles.php
+++ b/includes/api/ApiQueryProtectedTitles.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'pt' );
        }
 
diff --git a/includes/api/ApiQueryQueryPage.php 
b/includes/api/ApiQueryQueryPage.php
index 45950e7..8ddc48a 100644
--- a/includes/api/ApiQueryQueryPage.php
+++ b/includes/api/ApiQueryQueryPage.php
@@ -32,7 +32,7 @@
 class ApiQueryQueryPage extends ApiQueryGeneratorBase {
        private $qpMap;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'qp' );
                // Build mapping from special page names to QueryPage classes
                global $wgAPIUselessQueryPages;
diff --git a/includes/api/ApiQueryRandom.php b/includes/api/ApiQueryRandom.php
index 07f8a0e..a27edcf 100644
--- a/includes/api/ApiQueryRandom.php
+++ b/includes/api/ApiQueryRandom.php
@@ -33,7 +33,7 @@
 class ApiQueryRandom extends ApiQueryGeneratorBase {
        private $pageIDs;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rn' );
        }
 
diff --git a/includes/api/ApiQueryRecentChanges.php 
b/includes/api/ApiQueryRecentChanges.php
index 1fb2a69..6428d15 100644
--- a/includes/api/ApiQueryRecentChanges.php
+++ b/includes/api/ApiQueryRecentChanges.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rc' );
        }
 
diff --git a/includes/api/ApiQueryRedirects.php 
b/includes/api/ApiQueryRedirects.php
index afb2c56..2ed7d30 100644
--- a/includes/api/ApiQueryRedirects.php
+++ b/includes/api/ApiQueryRedirects.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryRedirects extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rd' );
        }
 
diff --git a/includes/api/ApiQueryRevisions.php 
b/includes/api/ApiQueryRevisions.php
index 50c3c7b..41bc8d4 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -37,7 +37,7 @@
        private $diffto, $difftotext, $expandTemplates, $generateXML, $section,
                $token, $parseContent, $contentFormat;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rv' );
        }
 
diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php
index d67fac2..8eceb6f 100644
--- a/includes/api/ApiQuerySearch.php
+++ b/includes/api/ApiQuerySearch.php
@@ -39,7 +39,7 @@
         */
        const BACKEND_NULL_PARAM = 'database-backed';
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'sr' );
        }
 
diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index 0a97d04..c9a7049 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -31,7 +31,7 @@
  */
 class ApiQuerySiteinfo extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'si' );
        }
 
diff --git a/includes/api/ApiQueryStashImageInfo.php 
b/includes/api/ApiQueryStashImageInfo.php
index d9409ec..c870835 100644
--- a/includes/api/ApiQueryStashImageInfo.php
+++ b/includes/api/ApiQueryStashImageInfo.php
@@ -27,7 +27,7 @@
  */
 class ApiQueryStashImageInfo extends ApiQueryImageInfo {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'sii' );
        }
 
diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php
index 77c105a..9e2559f 100644
--- a/includes/api/ApiQueryTags.php
+++ b/includes/api/ApiQueryTags.php
@@ -40,7 +40,7 @@
        private $fld_displayname = false, $fld_description = false,
                $fld_hitcount = false;
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'tg' );
        }
 
diff --git a/includes/api/ApiQueryUserContributions.php 
b/includes/api/ApiQueryUserContributions.php
index 568ccb5..780b2fa 100644
--- a/includes/api/ApiQueryUserContributions.php
+++ b/includes/api/ApiQueryUserContributions.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryContributions extends ApiQueryBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'uc' );
        }
 
diff --git a/includes/api/ApiQueryUserInfo.php 
b/includes/api/ApiQueryUserInfo.php
index ee5e458..200b03b 100644
--- a/includes/api/ApiQueryUserInfo.php
+++ b/includes/api/ApiQueryUserInfo.php
@@ -33,7 +33,7 @@
 
        private $prop = array();
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ui' );
        }
 
diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php
index d0d0f08..ce92063 100644
--- a/includes/api/ApiQueryUsers.php
+++ b/includes/api/ApiQueryUsers.php
@@ -50,7 +50,7 @@
                'gender',
        );
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'us' );
        }
 
diff --git a/includes/api/ApiQueryWatchlist.php 
b/includes/api/ApiQueryWatchlist.php
index 9a4dd82..d15ccba 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'wl' );
        }
 
diff --git a/includes/api/ApiQueryWatchlistRaw.php 
b/includes/api/ApiQueryWatchlistRaw.php
index 6aae6dc..07efb52 100644
--- a/includes/api/ApiQueryWatchlistRaw.php
+++ b/includes/api/ApiQueryWatchlistRaw.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
 
-       public function __construct( ApiQuery $query, $moduleName ) {
+       public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'wr' );
        }
 
diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php
index c351561..c729238 100644
--- a/includes/api/ApiResult.php
+++ b/includes/api/ApiResult.php
@@ -59,9 +59,10 @@
        private $mData, $mIsRawMode, $mSize, $mCheckingSize;
 
        /**
+        * Constructor
         * @param ApiMain $main
         */
-       public function __construct( ApiMain $main ) {
+       public function __construct( $main ) {
                parent::__construct( $main, 'result' );
                $this->mIsRawMode = false;
                $this->mCheckingSize = true;
diff --git a/includes/api/ApiRsd.php b/includes/api/ApiRsd.php
index a2771a0..7a0f0c6 100644
--- a/includes/api/ApiRsd.php
+++ b/includes/api/ApiRsd.php
@@ -160,7 +160,7 @@
 }
 
 class ApiFormatXmlRsd extends ApiFormatXml {
-       public function __construct( ApiMain $main, $format ) {
+       public function __construct( $main, $format ) {
                parent::__construct( $main, $format );
                $this->setRootElement( 'rsd' );
        }
diff --git a/tests/phpunit/includes/api/PrefixUniquenessTest.php 
b/tests/phpunit/includes/api/PrefixUniquenessTest.php
index 38beb87..a1fc2c2 100644
--- a/tests/phpunit/includes/api/PrefixUniquenessTest.php
+++ b/tests/phpunit/includes/api/PrefixUniquenessTest.php
@@ -14,8 +14,8 @@
                $prefixes = array();
 
                foreach ( $modules as $name => $class ) {
-                       /** @var ApiQueryBase $module */
-                       $module = new $class( $query, $name );
+                       /** @var ApiMain $module */
+                       $module = new $class( $main, $name );
                        $prefix = $module->getModulePrefix();
                        if ( isset( $prefixes[$prefix] ) ) {
                                $this->fail( "Module prefix '{$prefix}' is 
shared between {$class} and {$prefixes[$prefix]}" );

-- 
To view, visit https://gerrit.wikimedia.org/r/136157
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4c1e3447eb65c0d29c8be83822d01bc1f1c08fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf7
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to