jenkins-bot has submitted this change and it was merged.

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


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

Change I632d1032 should take care of the fatal error.

This reverts commit ca2bb3b5202595b2b2ec604f57977efff3ca1f61.

Change-Id: I29a9b6afee45c100deb2124f138ccf9f84e3edb9
---
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, 73 insertions(+), 65 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index 15b97d8..8954abc 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -34,12 +34,11 @@
        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( $main, $format ) {
+       public function __construct( ApiMain $main, $format ) {
                parent::__construct( $main, $format );
 
                $this->mIsHtml = ( substr( $format, -2, 2 ) === 'fm' ); // ends 
with 'fm'
@@ -347,7 +346,7 @@
  */
 class ApiFormatFeedWrapper extends ApiFormatBase {
 
-       public function __construct( $main ) {
+       public function __construct( ApiMain $main ) {
                parent::__construct( $main, 'feed' );
        }
 
diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php
index be0b58b..e2c6b9a 100644
--- a/includes/api/ApiFormatJson.php
+++ b/includes/api/ApiFormatJson.php
@@ -32,7 +32,7 @@
 
        private $mIsRaw;
 
-       public function __construct( $main, $format ) {
+       public function __construct( ApiMain $main, $format ) {
                parent::__construct( $main, $format );
                $this->mIsRaw = ( $format === 'rawfm' );
        }
diff --git a/includes/api/ApiFormatRaw.php b/includes/api/ApiFormatRaw.php
index af17554..3f5c8b7 100644
--- a/includes/api/ApiFormatRaw.php
+++ b/includes/api/ApiFormatRaw.php
@@ -31,11 +31,10 @@
 class ApiFormatRaw extends ApiFormatBase {
 
        /**
-        * Constructor
         * @param ApiMain $main
-        * @param ApiFormatBase $errorFallback ApiFormatBase object to fall 
back on for errors
+        * @param ApiFormatBase $errorFallback Object to fall back on for errors
         */
-       public function __construct( $main, $errorFallback ) {
+       public function __construct( ApiMain $main, ApiFormatBase 
$errorFallback ) {
                parent::__construct( $main, 'raw' );
                $this->mErrorFallback = $errorFallback;
        }
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 46e2a53..6336e81 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -32,7 +32,7 @@
  */
 class ApiLogin extends ApiBase {
 
-       public function __construct( $main, $action ) {
+       public function __construct( ApiMain $main, $action ) {
                parent::__construct( $main, $action, 'lg' );
        }
 
diff --git a/includes/api/ApiModuleManager.php 
b/includes/api/ApiModuleManager.php
index 935fa42..8226529 100644
--- a/includes/api/ApiModuleManager.php
+++ b/includes/api/ApiModuleManager.php
@@ -33,9 +33,21 @@
  */
 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 804a857..20444d0 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -98,7 +98,6 @@
        }
 
        /**
-        * 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 7f9ad4c..622e3a6 100644
--- a/includes/api/ApiParamInfo.php
+++ b/includes/api/ApiParamInfo.php
@@ -34,7 +34,7 @@
         */
        protected $queryObj;
 
-       public function __construct( $main, $action ) {
+       public function __construct( ApiMain $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 d1bddbf..fc115b8 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -125,7 +125,7 @@
         * @param ApiMain $main
         * @param string $action
         */
-       public function __construct( $main, $action ) {
+       public function __construct( ApiMain $main, $action ) {
                parent::__construct( $main, $action );
 
                $this->mModuleMgr = new ApiModuleManager( $this );
diff --git a/includes/api/ApiQueryAllCategories.php 
b/includes/api/ApiQueryAllCategories.php
index 38ec127..1b65097 100644
--- a/includes/api/ApiQueryAllCategories.php
+++ b/includes/api/ApiQueryAllCategories.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryAllCategories extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ac' );
        }
 
diff --git a/includes/api/ApiQueryAllImages.php 
b/includes/api/ApiQueryAllImages.php
index 669351f..4266a8e 100644
--- a/includes/api/ApiQueryAllImages.php
+++ b/includes/api/ApiQueryAllImages.php
@@ -34,7 +34,7 @@
 class ApiQueryAllImages extends ApiQueryGeneratorBase {
        protected $mRepo;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $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 9324acb..61bc90e 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( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                switch ( $moduleName ) {
                        case 'alllinks':
                                $prefix = 'al';
diff --git a/includes/api/ApiQueryAllMessages.php 
b/includes/api/ApiQueryAllMessages.php
index 09f40fd..8d4af0b 100644
--- a/includes/api/ApiQueryAllMessages.php
+++ b/includes/api/ApiQueryAllMessages.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryAllMessages extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'am' );
        }
 
diff --git a/includes/api/ApiQueryAllPages.php 
b/includes/api/ApiQueryAllPages.php
index 4ac9485..b283177 100644
--- a/includes/api/ApiQueryAllPages.php
+++ b/includes/api/ApiQueryAllPages.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryAllPages extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ap' );
        }
 
diff --git a/includes/api/ApiQueryAllUsers.php 
b/includes/api/ApiQueryAllUsers.php
index df8db16..42464ef 100644
--- a/includes/api/ApiQueryAllUsers.php
+++ b/includes/api/ApiQueryAllUsers.php
@@ -30,7 +30,7 @@
  * @ingroup API
  */
 class ApiQueryAllUsers extends ApiQueryBase {
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'au' );
        }
 
diff --git a/includes/api/ApiQueryBacklinks.php 
b/includes/api/ApiQueryBacklinks.php
index 524dda4..8dc2a65 100644
--- a/includes/api/ApiQueryBacklinks.php
+++ b/includes/api/ApiQueryBacklinks.php
@@ -75,7 +75,7 @@
                )
        );
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $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 eac25e6..01384c0 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 ApiBase $query
+        * @param ApiQuery $queryModule
         * @param string $moduleName
         * @param string $paramPrefix
         */
-       public function __construct( ApiBase $query, $moduleName, $paramPrefix 
= '' ) {
-               parent::__construct( $query->getMain(), $moduleName, 
$paramPrefix );
-               $this->mQueryModule = $query;
+       public function __construct( ApiQuery $queryModule, $moduleName, 
$paramPrefix = '' ) {
+               parent::__construct( $queryModule->getMain(), $moduleName, 
$paramPrefix );
+               $this->mQueryModule = $queryModule;
                $this->mDb = null;
                $this->resetQueryParams();
        }
diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php
index f69b310..7d27a64 100644
--- a/includes/api/ApiQueryBlocks.php
+++ b/includes/api/ApiQueryBlocks.php
@@ -36,7 +36,7 @@
         */
        protected $usernames;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'bk' );
        }
 
diff --git a/includes/api/ApiQueryCategories.php 
b/includes/api/ApiQueryCategories.php
index 90e8ed7..cfc76e6 100644
--- a/includes/api/ApiQueryCategories.php
+++ b/includes/api/ApiQueryCategories.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryCategories extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'cl' );
        }
 
diff --git a/includes/api/ApiQueryCategoryInfo.php 
b/includes/api/ApiQueryCategoryInfo.php
index d0e3a36..8097b7b 100644
--- a/includes/api/ApiQueryCategoryInfo.php
+++ b/includes/api/ApiQueryCategoryInfo.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryCategoryInfo extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ci' );
        }
 
diff --git a/includes/api/ApiQueryCategoryMembers.php 
b/includes/api/ApiQueryCategoryMembers.php
index 14c2f81..a3bc3b9 100644
--- a/includes/api/ApiQueryCategoryMembers.php
+++ b/includes/api/ApiQueryCategoryMembers.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'cm' );
        }
 
diff --git a/includes/api/ApiQueryContributors.php 
b/includes/api/ApiQueryContributors.php
index 912ac02..b90283f 100644
--- a/includes/api/ApiQueryContributors.php
+++ b/includes/api/ApiQueryContributors.php
@@ -38,7 +38,7 @@
         */
        const MAX_PAGES = 100;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $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 2ca93f5..af0d938 100644
--- a/includes/api/ApiQueryDeletedrevs.php
+++ b/includes/api/ApiQueryDeletedrevs.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryDeletedrevs extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'dr' );
        }
 
diff --git a/includes/api/ApiQueryDuplicateFiles.php 
b/includes/api/ApiQueryDuplicateFiles.php
index 3105f91..4645402 100644
--- a/includes/api/ApiQueryDuplicateFiles.php
+++ b/includes/api/ApiQueryDuplicateFiles.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'df' );
        }
 
diff --git a/includes/api/ApiQueryExtLinksUsage.php 
b/includes/api/ApiQueryExtLinksUsage.php
index da095e6..070681c 100644
--- a/includes/api/ApiQueryExtLinksUsage.php
+++ b/includes/api/ApiQueryExtLinksUsage.php
@@ -29,7 +29,7 @@
  */
 class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'eu' );
        }
 
diff --git a/includes/api/ApiQueryExternalLinks.php 
b/includes/api/ApiQueryExternalLinks.php
index f7a0958..e3a7be3 100644
--- a/includes/api/ApiQueryExternalLinks.php
+++ b/includes/api/ApiQueryExternalLinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryExternalLinks extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'el' );
        }
 
diff --git a/includes/api/ApiQueryFileRepoInfo.php 
b/includes/api/ApiQueryFileRepoInfo.php
index d9579a1..d1600ef 100644
--- a/includes/api/ApiQueryFileRepoInfo.php
+++ b/includes/api/ApiQueryFileRepoInfo.php
@@ -29,7 +29,7 @@
  */
 class ApiQueryFileRepoInfo extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'fri' );
        }
 
diff --git a/includes/api/ApiQueryFilearchive.php 
b/includes/api/ApiQueryFilearchive.php
index e12d927..97918e3 100644
--- a/includes/api/ApiQueryFilearchive.php
+++ b/includes/api/ApiQueryFilearchive.php
@@ -33,7 +33,7 @@
  */
 class ApiQueryFilearchive extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'fa' );
        }
 
diff --git a/includes/api/ApiQueryIWBacklinks.php 
b/includes/api/ApiQueryIWBacklinks.php
index ec5453c..35b2b40 100644
--- a/includes/api/ApiQueryIWBacklinks.php
+++ b/includes/api/ApiQueryIWBacklinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'iwbl' );
        }
 
diff --git a/includes/api/ApiQueryIWLinks.php b/includes/api/ApiQueryIWLinks.php
index a7b69a0..f38a7b1 100644
--- a/includes/api/ApiQueryIWLinks.php
+++ b/includes/api/ApiQueryIWLinks.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryIWLinks extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'iw' );
        }
 
diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index 5c410a4..5a82f19 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( $query, $moduleName, $prefix = 'ii' ) {
+       public function __construct( ApiQuery $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 032050e..87b0778 100644
--- a/includes/api/ApiQueryImages.php
+++ b/includes/api/ApiQueryImages.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryImages extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'im' );
        }
 
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index 7a70299..f160791 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -48,7 +48,7 @@
 
        private $tokenFunctions;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'in' );
        }
 
diff --git a/includes/api/ApiQueryLangBacklinks.php 
b/includes/api/ApiQueryLangBacklinks.php
index 5f28654..13711e6 100644
--- a/includes/api/ApiQueryLangBacklinks.php
+++ b/includes/api/ApiQueryLangBacklinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'lbl' );
        }
 
diff --git a/includes/api/ApiQueryLangLinks.php 
b/includes/api/ApiQueryLangLinks.php
index 8e155f2..53cfba1 100644
--- a/includes/api/ApiQueryLangLinks.php
+++ b/includes/api/ApiQueryLangLinks.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryLangLinks extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'll' );
        }
 
diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php
index dd816cf..7c17938 100644
--- a/includes/api/ApiQueryLinks.php
+++ b/includes/api/ApiQueryLinks.php
@@ -36,7 +36,7 @@
 
        private $table, $prefix, $description, $helpUrl;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                switch ( $moduleName ) {
                        case self::LINKS:
                                $this->table = 'pagelinks';
diff --git a/includes/api/ApiQueryLogEvents.php 
b/includes/api/ApiQueryLogEvents.php
index c48fb43..2d9d710 100644
--- a/includes/api/ApiQueryLogEvents.php
+++ b/includes/api/ApiQueryLogEvents.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryLogEvents extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'le' );
        }
 
diff --git a/includes/api/ApiQueryPagePropNames.php 
b/includes/api/ApiQueryPagePropNames.php
index c387475..8cd9c6c 100644
--- a/includes/api/ApiQueryPagePropNames.php
+++ b/includes/api/ApiQueryPagePropNames.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryPagePropNames extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ppn' );
        }
 
diff --git a/includes/api/ApiQueryPageProps.php 
b/includes/api/ApiQueryPageProps.php
index b68a385..e370c39 100644
--- a/includes/api/ApiQueryPageProps.php
+++ b/includes/api/ApiQueryPageProps.php
@@ -33,7 +33,7 @@
 
        private $params;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'pp' );
        }
 
diff --git a/includes/api/ApiQueryPagesWithProp.php 
b/includes/api/ApiQueryPagesWithProp.php
index 4381485..b6c8525 100644
--- a/includes/api/ApiQueryPagesWithProp.php
+++ b/includes/api/ApiQueryPagesWithProp.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'pwp' );
        }
 
diff --git a/includes/api/ApiQueryProtectedTitles.php 
b/includes/api/ApiQueryProtectedTitles.php
index 368705d..8f120c6 100644
--- a/includes/api/ApiQueryProtectedTitles.php
+++ b/includes/api/ApiQueryProtectedTitles.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'pt' );
        }
 
diff --git a/includes/api/ApiQueryQueryPage.php 
b/includes/api/ApiQueryQueryPage.php
index 8ddc48a..45950e7 100644
--- a/includes/api/ApiQueryQueryPage.php
+++ b/includes/api/ApiQueryQueryPage.php
@@ -32,7 +32,7 @@
 class ApiQueryQueryPage extends ApiQueryGeneratorBase {
        private $qpMap;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $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 a27edcf..07f8a0e 100644
--- a/includes/api/ApiQueryRandom.php
+++ b/includes/api/ApiQueryRandom.php
@@ -33,7 +33,7 @@
 class ApiQueryRandom extends ApiQueryGeneratorBase {
        private $pageIDs;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rn' );
        }
 
diff --git a/includes/api/ApiQueryRecentChanges.php 
b/includes/api/ApiQueryRecentChanges.php
index 6428d15..1fb2a69 100644
--- a/includes/api/ApiQueryRecentChanges.php
+++ b/includes/api/ApiQueryRecentChanges.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rc' );
        }
 
diff --git a/includes/api/ApiQueryRedirects.php 
b/includes/api/ApiQueryRedirects.php
index 2ed7d30..afb2c56 100644
--- a/includes/api/ApiQueryRedirects.php
+++ b/includes/api/ApiQueryRedirects.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryRedirects extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rd' );
        }
 
diff --git a/includes/api/ApiQueryRevisions.php 
b/includes/api/ApiQueryRevisions.php
index 41bc8d4..50c3c7b 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( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rv' );
        }
 
diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php
index 8eceb6f..d67fac2 100644
--- a/includes/api/ApiQuerySearch.php
+++ b/includes/api/ApiQuerySearch.php
@@ -39,7 +39,7 @@
         */
        const BACKEND_NULL_PARAM = 'database-backed';
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'sr' );
        }
 
diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index c9a7049..0a97d04 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -31,7 +31,7 @@
  */
 class ApiQuerySiteinfo extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'si' );
        }
 
diff --git a/includes/api/ApiQueryStashImageInfo.php 
b/includes/api/ApiQueryStashImageInfo.php
index c870835..d9409ec 100644
--- a/includes/api/ApiQueryStashImageInfo.php
+++ b/includes/api/ApiQueryStashImageInfo.php
@@ -27,7 +27,7 @@
  */
 class ApiQueryStashImageInfo extends ApiQueryImageInfo {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'sii' );
        }
 
diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php
index 9e2559f..77c105a 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( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'tg' );
        }
 
diff --git a/includes/api/ApiQueryUserContributions.php 
b/includes/api/ApiQueryUserContributions.php
index 780b2fa..568ccb5 100644
--- a/includes/api/ApiQueryUserContributions.php
+++ b/includes/api/ApiQueryUserContributions.php
@@ -31,7 +31,7 @@
  */
 class ApiQueryContributions extends ApiQueryBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'uc' );
        }
 
diff --git a/includes/api/ApiQueryUserInfo.php 
b/includes/api/ApiQueryUserInfo.php
index 200b03b..ee5e458 100644
--- a/includes/api/ApiQueryUserInfo.php
+++ b/includes/api/ApiQueryUserInfo.php
@@ -33,7 +33,7 @@
 
        private $prop = array();
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'ui' );
        }
 
diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php
index ce92063..d0d0f08 100644
--- a/includes/api/ApiQueryUsers.php
+++ b/includes/api/ApiQueryUsers.php
@@ -50,7 +50,7 @@
                'gender',
        );
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'us' );
        }
 
diff --git a/includes/api/ApiQueryWatchlist.php 
b/includes/api/ApiQueryWatchlist.php
index d15ccba..9a4dd82 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'wl' );
        }
 
diff --git a/includes/api/ApiQueryWatchlistRaw.php 
b/includes/api/ApiQueryWatchlistRaw.php
index 07efb52..6aae6dc 100644
--- a/includes/api/ApiQueryWatchlistRaw.php
+++ b/includes/api/ApiQueryWatchlistRaw.php
@@ -32,7 +32,7 @@
  */
 class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'wr' );
        }
 
diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php
index c729238..c351561 100644
--- a/includes/api/ApiResult.php
+++ b/includes/api/ApiResult.php
@@ -59,10 +59,9 @@
        private $mData, $mIsRawMode, $mSize, $mCheckingSize;
 
        /**
-        * Constructor
         * @param ApiMain $main
         */
-       public function __construct( $main ) {
+       public function __construct( ApiMain $main ) {
                parent::__construct( $main, 'result' );
                $this->mIsRawMode = false;
                $this->mCheckingSize = true;
diff --git a/includes/api/ApiRsd.php b/includes/api/ApiRsd.php
index 7a0f0c6..a2771a0 100644
--- a/includes/api/ApiRsd.php
+++ b/includes/api/ApiRsd.php
@@ -160,7 +160,7 @@
 }
 
 class ApiFormatXmlRsd extends ApiFormatXml {
-       public function __construct( $main, $format ) {
+       public function __construct( ApiMain $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 a1fc2c2..38beb87 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 ApiMain $module */
-                       $module = new $class( $main, $name );
+                       /** @var ApiQueryBase $module */
+                       $module = new $class( $query, $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/136218
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I29a9b6afee45c100deb2124f138ccf9f84e3edb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf7
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to