Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
CreationReasonAuthenticationRequest | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
getFieldInfo | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Auth; |
4 | |
5 | /** |
6 | * Authentication request for the reason given for account creation. |
7 | * Used in logs and for notification. |
8 | * @stable to extend |
9 | */ |
10 | class CreationReasonAuthenticationRequest extends AuthenticationRequest { |
11 | /** @var string Account creation reason (only used when creating for someone else) */ |
12 | public $reason; |
13 | |
14 | /** @inheritDoc */ |
15 | public $required = self::OPTIONAL; |
16 | |
17 | /** |
18 | * @inheritDoc |
19 | * @stable to override |
20 | */ |
21 | public function getFieldInfo() { |
22 | return [ |
23 | 'reason' => [ |
24 | 'type' => 'string', |
25 | 'label' => wfMessage( 'createacct-reason' ), |
26 | 'help' => wfMessage( 'createacct-reason-help' ), |
27 | ], |
28 | ]; |
29 | } |
30 | } |