From 08cf4c49dfbcfeffe53e514d8f760c01fcd0d731 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Tue, 27 Oct 2020 18:25:24 +0100 Subject: [PATCH] Add PHPDoc documentation to all API query module constructors Change-Id: I2bc140576efc891bb9b6e50e44041d5bb022ac8f --- includes/api/ApiQueryAllCategories.php | 4 ++++ includes/api/ApiQueryAllDeletedRevisions.php | 4 ++++ includes/api/ApiQueryAllImages.php | 8 ++++++++ includes/api/ApiQueryAllLinks.php | 4 ++++ includes/api/ApiQueryAllPages.php | 4 ++++ includes/api/ApiQueryAllRevisions.php | 4 ++++ includes/api/ApiQueryBacklinks.php | 4 ++++ includes/api/ApiQueryBacklinksprop.php | 4 ++++ includes/api/ApiQueryCategories.php | 4 ++++ includes/api/ApiQueryCategoryMembers.php | 4 ++++ includes/api/ApiQueryDeletedRevisions.php | 4 ++++ includes/api/ApiQueryDuplicateFiles.php | 4 ++++ includes/api/ApiQueryExtLinksUsage.php | 4 ++++ includes/api/ApiQueryIWBacklinks.php | 4 ++++ includes/api/ApiQueryImages.php | 4 ++++ includes/api/ApiQueryLangBacklinks.php | 4 ++++ includes/api/ApiQueryLinks.php | 4 ++++ includes/api/ApiQueryPagesWithProp.php | 4 ++++ includes/api/ApiQueryPrefixSearch.php | 4 ++++ includes/api/ApiQueryProtectedTitles.php | 4 ++++ includes/api/ApiQueryQueryPage.php | 4 ++++ includes/api/ApiQueryRandom.php | 5 +++++ includes/api/ApiQueryRecentChanges.php | 4 ++++ includes/api/ApiQueryRevisions.php | 4 ++++ includes/api/ApiQuerySearch.php | 4 ++++ includes/api/ApiQueryWatchlist.php | 4 ++++ includes/api/ApiQueryWatchlistRaw.php | 4 ++++ 27 files changed, 113 insertions(+) diff --git a/includes/api/ApiQueryAllCategories.php b/includes/api/ApiQueryAllCategories.php index c22439deaa5..ee921524b9c 100644 --- a/includes/api/ApiQueryAllCategories.php +++ b/includes/api/ApiQueryAllCategories.php @@ -28,6 +28,10 @@ */ class ApiQueryAllCategories extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'ac' ); } diff --git a/includes/api/ApiQueryAllDeletedRevisions.php b/includes/api/ApiQueryAllDeletedRevisions.php index e709141a895..bc8a7d1a847 100644 --- a/includes/api/ApiQueryAllDeletedRevisions.php +++ b/includes/api/ApiQueryAllDeletedRevisions.php @@ -35,6 +35,10 @@ use MediaWiki\Storage\NameTableAccessException; */ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'adr' ); } diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 55fdd30f835..622b2495789 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -34,8 +34,16 @@ use Wikimedia\Rdbms\IDatabase; * @ingroup API */ class ApiQueryAllImages extends ApiQueryGeneratorBase { + + /** + * @var LocalRepo + */ protected $mRepo; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'ai' ); $this->mRepo = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo(); diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index 020608e810b..ad73c446359 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -36,6 +36,10 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { private $useIndex = null; private $props = []; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { switch ( $moduleName ) { case 'alllinks': diff --git a/includes/api/ApiQueryAllPages.php b/includes/api/ApiQueryAllPages.php index e86fc1f73c0..e9c5ea94f1c 100644 --- a/includes/api/ApiQueryAllPages.php +++ b/includes/api/ApiQueryAllPages.php @@ -28,6 +28,10 @@ use MediaWiki\MediaWikiServices; */ class ApiQueryAllPages extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'ap' ); } diff --git a/includes/api/ApiQueryAllRevisions.php b/includes/api/ApiQueryAllRevisions.php index d4392f65d9e..b0d51c6f1a2 100644 --- a/includes/api/ApiQueryAllRevisions.php +++ b/includes/api/ApiQueryAllRevisions.php @@ -32,6 +32,10 @@ use MediaWiki\Revision\RevisionRecord; */ class ApiQueryAllRevisions extends ApiQueryRevisionsBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'arv' ); } diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 49b109bc5fb..9be4c1fbf64 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -80,6 +80,10 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { ] ]; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { $settings = $this->backlinksSettings[$moduleName]; $prefix = $settings['prefix']; diff --git a/includes/api/ApiQueryBacklinksprop.php b/includes/api/ApiQueryBacklinksprop.php index 122157fb24b..f7af2a712fa 100644 --- a/includes/api/ApiQueryBacklinksprop.php +++ b/includes/api/ApiQueryBacklinksprop.php @@ -75,6 +75,10 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase { ], ]; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, self::$settings[$moduleName]['code'] ); } diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index 4fe01843a24..9c228b4042b 100644 --- a/includes/api/ApiQueryCategories.php +++ b/includes/api/ApiQueryCategories.php @@ -27,6 +27,10 @@ */ class ApiQueryCategories extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'cl' ); } diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 76b05b7a9eb..ab021eb5e32 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -27,6 +27,10 @@ */ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'cm' ); } diff --git a/includes/api/ApiQueryDeletedRevisions.php b/includes/api/ApiQueryDeletedRevisions.php index fc8d52a4bea..4694dd35ab4 100644 --- a/includes/api/ApiQueryDeletedRevisions.php +++ b/includes/api/ApiQueryDeletedRevisions.php @@ -35,6 +35,10 @@ use MediaWiki\Storage\NameTableAccessException; */ class ApiQueryDeletedRevisions extends ApiQueryRevisionsBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'drv' ); } diff --git a/includes/api/ApiQueryDuplicateFiles.php b/includes/api/ApiQueryDuplicateFiles.php index f694eafdea5..c279d4a1beb 100644 --- a/includes/api/ApiQueryDuplicateFiles.php +++ b/includes/api/ApiQueryDuplicateFiles.php @@ -29,6 +29,10 @@ use MediaWiki\MediaWikiServices; */ class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $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 00d83edaed3..2e6c4ec434d 100644 --- a/includes/api/ApiQueryExtLinksUsage.php +++ b/includes/api/ApiQueryExtLinksUsage.php @@ -25,6 +25,10 @@ */ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'eu' ); } diff --git a/includes/api/ApiQueryIWBacklinks.php b/includes/api/ApiQueryIWBacklinks.php index 8569854a780..c72ff3b69b9 100644 --- a/includes/api/ApiQueryIWBacklinks.php +++ b/includes/api/ApiQueryIWBacklinks.php @@ -29,6 +29,10 @@ */ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'iwbl' ); } diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php index d64c555df43..f7400813d4e 100644 --- a/includes/api/ApiQueryImages.php +++ b/includes/api/ApiQueryImages.php @@ -28,6 +28,10 @@ */ class ApiQueryImages extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'im' ); } diff --git a/includes/api/ApiQueryLangBacklinks.php b/includes/api/ApiQueryLangBacklinks.php index 9974a2c9722..ca10a86c14d 100644 --- a/includes/api/ApiQueryLangBacklinks.php +++ b/includes/api/ApiQueryLangBacklinks.php @@ -29,6 +29,10 @@ */ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'lbl' ); } diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php index 49114cdb571..3e712bb4ebb 100644 --- a/includes/api/ApiQueryLinks.php +++ b/includes/api/ApiQueryLinks.php @@ -34,6 +34,10 @@ class ApiQueryLinks extends ApiQueryGeneratorBase { private $table, $prefix, $titlesParam, $helpUrl; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { switch ( $moduleName ) { case self::LINKS: diff --git a/includes/api/ApiQueryPagesWithProp.php b/includes/api/ApiQueryPagesWithProp.php index 4f81e2b29c7..c55aa22f940 100644 --- a/includes/api/ApiQueryPagesWithProp.php +++ b/includes/api/ApiQueryPagesWithProp.php @@ -29,6 +29,10 @@ */ class ApiQueryPagesWithProp extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'pwp' ); } diff --git a/includes/api/ApiQueryPrefixSearch.php b/includes/api/ApiQueryPrefixSearch.php index 0446ed50b4c..6dc99209705 100644 --- a/includes/api/ApiQueryPrefixSearch.php +++ b/includes/api/ApiQueryPrefixSearch.php @@ -29,6 +29,10 @@ class ApiQueryPrefixSearch extends ApiQueryGeneratorBase { /** @var array list of api allowed params */ private $allowedParams; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( $query, $moduleName ) { parent::__construct( $query, $moduleName, 'ps' ); } diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php index 00ba609f2f0..e330244524c 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -27,6 +27,10 @@ */ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $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 826a9a73c26..3383500d290 100644 --- a/includes/api/ApiQueryQueryPage.php +++ b/includes/api/ApiQueryQueryPage.php @@ -40,6 +40,10 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { */ private $specialPageFactory; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'qp' ); $this->queryPages = array_values( array_diff( diff --git a/includes/api/ApiQueryRandom.php b/includes/api/ApiQueryRandom.php index 263f1c3e045..15136dfd56e 100644 --- a/includes/api/ApiQueryRandom.php +++ b/includes/api/ApiQueryRandom.php @@ -27,6 +27,11 @@ * @ingroup API */ class ApiQueryRandom extends ApiQueryGeneratorBase { + + /** + * @param ApiQuery $query + * @param string $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 18c0130b55b..4397f86616a 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -33,6 +33,10 @@ use MediaWiki\Storage\NameTableAccessException; */ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'rc' ); } diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index f96682cb28e..f640b545d90 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -37,6 +37,10 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase { private $token = null; + /** + * @param ApiQuery $query + * @param string $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 2670edf1d0c..021f561932d 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -31,6 +31,10 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { /** @var array list of api allowed params */ private $allowedParams; + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'sr' ); } diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 8c29d561695..08ab7d70612 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -35,6 +35,10 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { /** @var CommentStore */ private $commentStore; + /** + * @param ApiQuery $query + * @param string $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 e19179a7311..d03d9eebf1f 100644 --- a/includes/api/ApiQueryWatchlistRaw.php +++ b/includes/api/ApiQueryWatchlistRaw.php @@ -31,6 +31,10 @@ use MediaWiki\ParamValidator\TypeDef\UserDef; */ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { + /** + * @param ApiQuery $query + * @param string $moduleName + */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'wr' ); }