Passed
Pull Request — master (#1184)
by
unknown
33:24
created

UserAuthenticationFailed::getUsername()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace League\OAuth2\Server\Events;
4
5
use Psr\Http\Message\ServerRequestInterface;
6
7
final class UserAuthenticationFailed extends AbstractEvent
8
{
9
    /** @var string|null */
10
    private $username;
11
12
    public function __construct(
13
        ?string $username,
14
        ServerRequestInterface $request
15
    ) {
16
        parent::__construct($request);
17
        $this->name = 'user.authentication.failed';
18
        $this->username = $username;
19
    }
20
21
    public function getUsername(): ?string
22
    {
23
        return $this->username;
24
    }
25
}
26