diff options
33 files changed, 80 insertions, 1 deletions
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 7616365dd602..7c5b3d55d03a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -288,6 +288,7 @@ abstract class ApiBase extends ContextSource { /** @var string */ private $mModulePrefix; + /** @var IReadableDatabase|null */ private $mReplicaDB = null; /** * @var array diff --git a/includes/api/ApiComparePages.php b/includes/api/ApiComparePages.php index 94b36e653a38..c8b91f1d7a89 100644 --- a/includes/api/ApiComparePages.php +++ b/includes/api/ApiComparePages.php @@ -46,6 +46,7 @@ class ApiComparePages extends ApiBase { /** @var Title|null|false */ private $guessedTitle = false; + /** @var array<string,true> */ private $props; private IContentHandlerFactory $contentHandlerFactory; diff --git a/includes/api/ApiErrorFormatter.php b/includes/api/ApiErrorFormatter.php index b116f55e1da2..c1a7b0560a97 100644 --- a/includes/api/ApiErrorFormatter.php +++ b/includes/api/ApiErrorFormatter.php @@ -46,7 +46,9 @@ class ApiErrorFormatter { protected $lang; /** @var PageReference|null page used for rendering error messages, or null to use the dummy title */ private $title = null; + /** @var bool */ protected $useDB = false; + /** @var string */ protected $format = 'none'; /** diff --git a/includes/api/ApiFeedRecentChanges.php b/includes/api/ApiFeedRecentChanges.php index 9d7dc28851ec..b14a04c12ca1 100644 --- a/includes/api/ApiFeedRecentChanges.php +++ b/includes/api/ApiFeedRecentChanges.php @@ -38,6 +38,7 @@ use Wikimedia\ParamValidator\TypeDef\IntegerDef; */ class ApiFeedRecentChanges extends ApiBase { + /** @var array */ private $params; private SpecialPageFactory $specialPageFactory; diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index ea053c5b4e0b..b9fad911b0ca 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -37,7 +37,9 @@ use Wikimedia\ParamValidator\TypeDef\IntegerDef; */ class ApiFeedWatchlist extends ApiBase { + /** @var ApiBase|null */ private $watchlistModule = null; + /** @var bool */ private $linkToSections = false; private ParserFactory $parserFactory; diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 3e7a3a127527..15551f26389e 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -39,8 +39,11 @@ abstract class ApiFormatBase extends ApiBase { private string $mFormat; private string $mBuffer = ''; private bool $mDisabled = false; + /** @var bool */ private $mIsWrappedHtml = false; + /** @var int|false */ private $mHttpStatus = false; + /** @var bool */ protected $mForceDefaultParams = false; /** diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index e98683c7bde7..9eedbc86af80 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -29,6 +29,7 @@ use Wikimedia\ParamValidator\ParamValidator; */ class ApiFormatJson extends ApiFormatBase { + /** @var bool */ private $isRaw; public function __construct( ApiMain $main, $format ) { diff --git a/includes/api/ApiFormatRaw.php b/includes/api/ApiFormatRaw.php index 504450b10f29..56e649b7928d 100644 --- a/includes/api/ApiFormatRaw.php +++ b/includes/api/ApiFormatRaw.php @@ -26,7 +26,9 @@ */ class ApiFormatRaw extends ApiFormatBase { + /** @var ApiFormatBase|null */ private $errorFallback; + /** @var bool */ private $mFailWithHTTPError = false; /** diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index 11a7687e3031..a5df3dc145e1 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -30,9 +30,13 @@ use Wikimedia\ParamValidator\ParamValidator; */ class ApiFormatXml extends ApiFormatBase { + /** @var string */ private $mRootElemName = 'api'; + /** @var string */ public static $namespace = 'http://www.mediawiki.org/xml/api/'; + /** @var bool */ private $mIncludeNamespace = false; + /** @var string|null */ private $mXslt = null; public function getMimeType() { diff --git a/includes/api/ApiHelpParamValueMessage.php b/includes/api/ApiHelpParamValueMessage.php index 5d9568177bf7..665a676bbe7e 100644 --- a/includes/api/ApiHelpParamValueMessage.php +++ b/includes/api/ApiHelpParamValueMessage.php @@ -35,8 +35,11 @@ use MediaWiki\Message\Message; */ class ApiHelpParamValueMessage extends Message { + /** @var string */ protected $paramValue; + /** @var bool */ protected $deprecated; + /** @var bool */ protected $internal; /** diff --git a/includes/api/ApiImageRotate.php b/includes/api/ApiImageRotate.php index e238a1700dea..654a4e7d9733 100644 --- a/includes/api/ApiImageRotate.php +++ b/includes/api/ApiImageRotate.php @@ -27,6 +27,7 @@ use Wikimedia\ParamValidator\ParamValidator; * @ingroup API */ class ApiImageRotate extends ApiBase { + /** @var ApiPageSet|null */ private $mPageSet = null; private RepoGroup $repoGroup; diff --git a/includes/api/ApiImportReporter.php b/includes/api/ApiImportReporter.php index b224018c3148..e6e31eb4939b 100644 --- a/includes/api/ApiImportReporter.php +++ b/includes/api/ApiImportReporter.php @@ -29,6 +29,7 @@ use MediaWiki\Title\ForeignTitle; * @ingroup API */ class ApiImportReporter extends ImportReporter { + /** @var array[] */ private $mResultArr = []; /** diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index accf8182d2f9..00db941df4df 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -2417,6 +2417,7 @@ class ApiMain extends ApiBase { } } + /** @var bool|null */ private $mCanApiHighLimits = null; /** diff --git a/includes/api/ApiMessageTrait.php b/includes/api/ApiMessageTrait.php index f9daf25ab9de..eea259908e2a 100644 --- a/includes/api/ApiMessageTrait.php +++ b/includes/api/ApiMessageTrait.php @@ -30,6 +30,7 @@ trait ApiMessageTrait { /** * Compatibility code mappings for various MW messages. * @todo Ideally anything relying on this should be changed to use ApiMessage. + * @var string[] */ protected static $messageMap = [ 'actionthrottledtext' => 'ratelimited', @@ -93,7 +94,9 @@ trait ApiMessageTrait { 'userrights-no-interwiki' => 'nointerwikiuserrights', ]; + /** @var string|null */ protected $apiCode = null; + /** @var array */ protected $apiData = []; public function getApiCode() { diff --git a/includes/api/ApiOpenSearch.php b/includes/api/ApiOpenSearch.php index f2ca6e44b569..5b85442ebe45 100644 --- a/includes/api/ApiOpenSearch.php +++ b/includes/api/ApiOpenSearch.php @@ -35,7 +35,9 @@ use Wikimedia\ParamValidator\ParamValidator; class ApiOpenSearch extends ApiBase { use SearchApi; + /** @var string|null */ private $format = null; + /** @var string|null */ private $fm = null; private LinkBatchFactory $linkBatchFactory; diff --git a/includes/api/ApiOpenSearchFormatJson.php b/includes/api/ApiOpenSearchFormatJson.php index 274ea9ebc3ee..63410adc3d13 100644 --- a/includes/api/ApiOpenSearchFormatJson.php +++ b/includes/api/ApiOpenSearchFormatJson.php @@ -26,6 +26,7 @@ * @ingroup API */ class ApiOpenSearchFormatJson extends ApiFormatJson { + /** @var bool */ private $warningsAsError; public function __construct( ApiMain $main, $fm, $warningsAsError ) { diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index ef75fc906de8..b95aa317a877 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -33,6 +33,7 @@ use Wikimedia\ParamValidator\ParamValidator; */ class ApiParamInfo extends ApiBase { + /** @var string */ private $helpFormat; /** @var RequestContext */ diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index a9935ede5401..b6d9dd887f87 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -567,7 +567,9 @@ class ApiQuery extends ApiBase { */ private $mPageSet; + /** @var array */ private $mParams; + /** @var ApiModuleManager */ private $mModuleMgr; private WikiExporterFactory $wikiExporterFactory; diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index 28c7a0df7c31..0ecfcdf0df40 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -40,10 +40,15 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { private string $table; private string $tablePrefix; private string $indexTag; + /** @var string */ private $fieldTitle = 'title'; + /** @var int */ private $dfltNamespace = NS_MAIN; + /** @var bool */ private $hasNamespace = true; + /** @var string|null */ private $useIndex = null; + /** @var array */ private $props = []; private NamespaceInfo $namespaceInfo; diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 970dee949f87..bfce3b3005ef 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -45,9 +45,11 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { */ private $linksMigration; + /** @var array */ private $params; /** @var array */ private $cont; + /** @var bool */ private $redirect; private string $bl_ns; @@ -67,9 +69,12 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { * @var array */ private $pageMap = []; + /** @var array */ private $resultArr; + /** @var array */ private $redirTitles = []; + /** @var string|null */ private $continueStr = null; /** @var string[][] output element name, database column field prefix, database table */ diff --git a/includes/api/ApiQueryGeneratorBase.php b/includes/api/ApiQueryGeneratorBase.php index 6b2c8133beff..aa818b38aa4d 100644 --- a/includes/api/ApiQueryGeneratorBase.php +++ b/includes/api/ApiQueryGeneratorBase.php @@ -27,6 +27,7 @@ */ abstract class ApiQueryGeneratorBase extends ApiQueryBase { + /** @var ApiPageSet|null */ private $mGeneratorPageSet = null; /** diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 263769a43346..9f1b56035da3 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -36,6 +36,7 @@ use Wikimedia\ParamValidator\TypeDef\IntegerDef; */ class ApiQueryImageInfo extends ApiQueryBase { public const TRANSFORM_LIMIT = 50; + /** @var int */ private static $transformCount = 0; private RepoGroup $repoGroup; diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index d6a3ef49725c..428be56921bf 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -95,6 +95,7 @@ class ApiQueryInfo extends ApiQueryBase { */ private $fld_associatedpage = false; + /** @var array */ private $params; /** @var array<int,PageIdentity> */ @@ -130,15 +131,25 @@ class ApiQueryInfo extends ApiQueryBase { */ private $pageLength; + /** @var array[][][] */ private $protections; + /** @var string[][][] */ private $restrictionTypes; + /** @var bool[][] */ private $watched; + /** @var int[][] */ private $watchers; + /** @var int[][] */ private $visitingwatchers; + /** @var string[][] */ private $notificationtimestamps; + /** @var int[][] */ private $talkids; + /** @var int[][] */ private $subjectids; + /** @var string[][] */ private $displaytitles; + /** @var string[][] */ private $variantTitles; /** @@ -153,8 +164,10 @@ class ApiQueryInfo extends ApiQueryBase { */ private $linkClasses; + /** @var bool */ private $showZeroWatchers = false; + /** @var int */ private $countTestedActions = 0; /** diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index f8da8730c014..be8672d72b30 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -55,6 +55,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { private TempUserConfig $tempUserConfig; private LogFormatterFactory $logFormatterFactory; + /** @var string[] */ private $formattedComments = []; /** diff --git a/includes/api/ApiQueryRevisionsBase.php b/includes/api/ApiQueryRevisionsBase.php index 18398a3964ef..76b7ba2bedb1 100644 --- a/includes/api/ApiQueryRevisionsBase.php +++ b/includes/api/ApiQueryRevisionsBase.php @@ -64,20 +64,31 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase { // endregion - // phpcs:ignore MediaWiki.Commenting.PropertyDocumentation.WrongStyle + /** @var int|string|null */ protected $limit; + /** @var int|string|null */ protected $diffto; + /** @var string|null */ protected $difftotext; + /** @var bool */ protected $difftotextpst; + /** @var int|string|null */ protected $expandTemplates; + /** @var bool */ protected $generateXML; + /** @var int|string|null */ protected $section; + /** @var bool */ protected $parseContent; + /** @var bool */ protected $fetchContent; + /** @var string */ protected $contentFormat; protected bool $setParsedLimit = true; protected ?array $slotRoles = null; + /** @var string[] */ protected $slotContentFormats; + /** @var bool */ protected $needSlots; protected bool $fld_ids = false; diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index f0707d42a735..c60e4f2cb873 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -36,6 +36,7 @@ use Wikimedia\ParamValidator\ParamValidator; class ApiQueryUsers extends ApiQueryBase { use ApiQueryBlockInfoTrait; + /** @var array<string,true> */ private $prop; private UserNameUtils $userNameUtils; diff --git a/includes/api/ApiRemoveAuthenticationData.php b/includes/api/ApiRemoveAuthenticationData.php index f71062f23365..00152371c275 100644 --- a/includes/api/ApiRemoveAuthenticationData.php +++ b/includes/api/ApiRemoveAuthenticationData.php @@ -31,7 +31,9 @@ use MediaWiki\MainConfigNames; */ class ApiRemoveAuthenticationData extends ApiBase { + /** @var string */ private $authAction; + /** @var string */ private $operation; private AuthManager $authManager; diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index 95625ce0d8cf..190bb5c90134 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -143,6 +143,7 @@ class ApiResult implements ApiSerializable { */ public const META_BC_SUBELEMENTS = '_BC_subelements'; + /** @var mixed */ private $data; private int $size; /** @var int|false */ diff --git a/includes/api/ApiSetNotificationTimestamp.php b/includes/api/ApiSetNotificationTimestamp.php index b1f4e3e0c7ff..520a2d977be4 100644 --- a/includes/api/ApiSetNotificationTimestamp.php +++ b/includes/api/ApiSetNotificationTimestamp.php @@ -37,6 +37,7 @@ use Wikimedia\Rdbms\IConnectionProvider; */ class ApiSetNotificationTimestamp extends ApiBase { + /** @var ApiPageSet|null */ private $mPageSet = null; private RevisionStore $revisionStore; diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 222716661a93..6f5cf88ee539 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -49,6 +49,7 @@ class ApiUpload extends ApiBase { /** @var UploadBase|UploadFromChunks */ protected $mUpload = null; + /** @var array */ protected $mParams; private JobQueueGroup $jobQueueGroup; diff --git a/includes/api/ApiUsageException.php b/includes/api/ApiUsageException.php index fe9d0cc4cdde..4802b0eca3d9 100644 --- a/includes/api/ApiUsageException.php +++ b/includes/api/ApiUsageException.php @@ -31,7 +31,9 @@ use Wikimedia\Message\MessageSpecifier; */ class ApiUsageException extends MWException implements Stringable, ILocalizedException { + /** @var string|null */ protected $modulePath; + /** @var StatusValue */ protected $status; /** diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index e5477b1e5e03..36c0888cddaa 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -35,6 +35,7 @@ use Wikimedia\ParamValidator\TypeDef\ExpiryDef; * @ingroup API */ class ApiWatch extends ApiBase { + /** @var ApiPageSet|null */ private $mPageSet = null; /** @var bool Whether watchlist expiries are enabled. */ diff --git a/includes/api/SearchApi.php b/includes/api/SearchApi.php index e8190c7e941c..fe2e0fc108f7 100644 --- a/includes/api/SearchApi.php +++ b/includes/api/SearchApi.php @@ -51,6 +51,7 @@ trait SearchApi { * a valid option for an array for PARAM_TYPE, so we'll use a fake name * that can't possibly be a class name and describes what the null behavior * does + * @var string */ private static $BACKEND_NULL_PARAM = 'database-backed'; |