Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
CreatedAccountAuthenticationRequest
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getFieldInfo
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2/**
3 * @license GPL-2.0-or-later
4 * @file
5 */
6
7namespace MediaWiki\Auth;
8
9/**
10 * Returned from account creation to allow for logging into the created account
11 *
12 * @stable to extend
13 * @ingroup Auth
14 * @since 1.27
15 */
16class CreatedAccountAuthenticationRequest extends AuthenticationRequest {
17
18    /** @inheritDoc */
19    public $required = self::OPTIONAL;
20
21    /** @var int User id */
22    public $id;
23
24    /**
25     * @inheritDoc
26     * @stable to override
27     */
28    public function getFieldInfo() {
29        return [];
30    }
31
32    /**
33     * @stable to call
34     * @param int $id User id
35     * @param string $name Username
36     */
37    public function __construct( $id, $name ) {
38        $this->id = (int)$id;
39        $this->username = $name;
40    }
41}