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