Add missing documentation to class properties

Change-Id: Ic7872cd2539dc79f88c70548cbd82d9de98f66b0
This commit is contained in:
Umherirrender 2024-08-19 21:36:23 +02:00
parent 406b04553e
commit 29103eecde
10 changed files with 31 additions and 15 deletions

View file

@ -1,10 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php"/>
<arg name="encoding" value="UTF-8"/>

View file

@ -22,8 +22,10 @@ use UnderflowException;
* FancyCaptcha for displaying captchas precomputed by captcha.py
*/
class FancyCaptcha extends SimpleCaptcha {
// used for fancycaptcha-edit, fancycaptcha-addurl, fancycaptcha-badlogin,
// fancycaptcha-accountcreate, fancycaptcha-create, fancycaptcha-sendemail via getMessage()
/**
* @var string used for fancycaptcha-edit, fancycaptcha-addurl, fancycaptcha-badlogin,
* fancycaptcha-accountcreate, fancycaptcha-create, fancycaptcha-sendemail via getMessage()
*/
protected static $messagePrefix = 'fancycaptcha-';
/**

View file

@ -16,6 +16,7 @@ class HTMLFancyCaptchaField extends HTMLFormField {
/** @var bool */
protected $showCreateHelp;
/** @var string */
protected $mClass = 'captcha';
/**

View file

@ -19,8 +19,10 @@ use MediaWiki\Html\Html;
use Xml;
class QuestyCaptcha extends SimpleCaptcha {
// used for questycaptcha-edit, questycaptcha-addurl, questycaptcha-badlogin,
// questycaptcha-createaccount, questycaptcha-create, questycaptcha-sendemail via getMessage()
/**
* @var string used for questycaptcha-edit, questycaptcha-addurl, questycaptcha-badlogin,
* questycaptcha-createaccount, questycaptcha-create, questycaptcha-sendemail via getMessage()
*/
protected static $messagePrefix = 'questycaptcha-';
/**

View file

@ -16,10 +16,13 @@ use MediaWiki\Request\WebRequest;
use MediaWiki\Status\Status;
class ReCaptchaNoCaptcha extends SimpleCaptcha {
// used for renocaptcha-edit, renocaptcha-addurl, renocaptcha-badlogin, renocaptcha-createaccount,
// renocaptcha-create, renocaptcha-sendemail via getMessage()
/**
* @var string used for renocaptcha-edit, renocaptcha-addurl, renocaptcha-badlogin, renocaptcha-createaccount,
* renocaptcha-create, renocaptcha-sendemail via getMessage()
*/
protected static $messagePrefix = 'renocaptcha-';
/** @var string|null */
private $error = null;
/**

View file

@ -45,6 +45,7 @@ use WikiPage;
* Demo CAPTCHA (not for production usage) and base class for real CAPTCHAs
*/
class SimpleCaptcha {
/** @var string */
protected static $messagePrefix = 'captcha-';
/** @var bool Override to force showing the CAPTCHA to users who don't have "skipcaptcha" right. */

View file

@ -16,10 +16,13 @@ use MediaWiki\Request\WebRequest;
use MediaWiki\Status\Status;
class Turnstile extends SimpleCaptcha {
// used for turnstile-edit, turnstile-addurl, turnstile-badlogin, turnstile-createaccount,
// turnstile-create, turnstile-sendemail via getMessage()
/**
* @var string used for turnstile-edit, turnstile-addurl, turnstile-badlogin, turnstile-createaccount,
* turnstile-create, turnstile-sendemail via getMessage()
*/
protected static $messagePrefix = 'turnstile-';
/** @var string|null */
private $error = null;
/**

View file

@ -5,6 +5,7 @@ namespace MediaWiki\Extension\ConfirmEdit\hCaptcha;
use ApiBase;
use FormatJson;
use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Config\Config;
use MediaWiki\Context\RequestContext;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Hooks;
@ -18,14 +19,19 @@ use MediaWiki\Request\WebRequest;
use MediaWiki\Status\Status;
class HCaptcha extends SimpleCaptcha {
// used for hcaptcha-edit, hcaptcha-addurl, hcaptcha-badlogin, hcaptcha-createaccount,
// hcaptcha-create, hcaptcha-sendemail via getMessage()
/**
* @var string used for hcaptcha-edit, hcaptcha-addurl, hcaptcha-badlogin, hcaptcha-createaccount,
* hcaptcha-create, hcaptcha-sendemail via getMessage()
*/
protected static $messagePrefix = 'hcaptcha-';
/** @var string|null */
private $error = null;
/** @var Config */
private $hCaptchaConfig;
/** @var string */
private $siteKey;
public function __construct() {

View file

@ -53,6 +53,7 @@ class Hooks implements
AuthChangeFormFieldsHook
{
/** @var bool */
protected static $instanceCreated = false;
private WANObjectCache $cache;

View file

@ -3,6 +3,7 @@
namespace MediaWiki\Extension\ConfirmEdit\Store;
class CaptchaHashStore extends CaptchaStore {
/** @var array */
protected $data = [];
/**