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 * Used in logs and for notification.
8 * @stable to extend
9 */
10class CreationReasonAuthenticationRequest extends AuthenticationRequest {
11    /** @var string Account creation reason (only used when creating for someone else) */
12    public $reason;
13
14    public $required = self::OPTIONAL;
15
16    /**
17     * @inheritDoc
18     * @stable to override
19     */
20    public function getFieldInfo() {
21        return [
22            'reason' => [
23                'type' => 'string',
24                'label' => wfMessage( 'createacct-reason' ),
25                'help' => wfMessage( 'createacct-reason-help' ),
26            ],
27        ];
28    }
29}