Debian Codegraph @

extensions/ConfirmEdit/hCaptcha/includes/HCaptchaAuthenticationRequest.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\ConfirmEdit\hCaptcha;
4
5 use MediaWiki\Auth\AuthenticationRequest;
6 use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
7
8 class HCaptchaAuthenticationRequest extends CaptchaAuthenticationRequest {
9 public function __construct() {
10 parent::__construct( '', [] );
11 }
12
13 /**
14 * @inheritDoc
15 */
16 public function loadFromSubmission( array $data ) {
17 // unhack the hack in parent
18 return AuthenticationRequest::loadFromSubmission( $data );
19 }
20
21 /**
22 * @inheritDoc
23 */
24 public function getFieldInfo() {
25 $fieldInfo = parent::getFieldInfo();
26
27 return [
28 'captchaWord' => [
29 'type' => 'string',
30 'label' => $fieldInfo['captchaInfo']['label'],
31 'help' => \wfMessage( 'hcaptcha-help' ),
32 ],
33 ];
34 }
35 }