UserIdentity   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 37
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDisplayName() 0 3 1
A getUsername() 0 3 1
A getUserHandle() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace MadWizard\WebAuthn\Server;
4
5
use MadWizard\WebAuthn\Credential\UserHandle;
6
7
class UserIdentity implements UserIdentityInterface
8
{
9
    /**
10
     * @var UserHandle
11
     */
12
    private $userHandle;
13
14
    /**
15
     * @var string
16
     */
17
    private $username;
18
19
    /**
20
     * @var string
21
     */
22
    private $displayName;
23
24 1
    public function __construct(UserHandle $userHandle, string $username, string $displayName)
25
    {
26 1
        $this->userHandle = $userHandle;
27 1
        $this->username = $username;
28 1
        $this->displayName = $displayName;
29 1
    }
30
31 1
    public function getUserHandle(): UserHandle
32
    {
33 1
        return $this->userHandle;
34
    }
35
36 1
    public function getUsername(): string
37
    {
38 1
        return $this->username;
39
    }
40
41 1
    public function getDisplayName(): string
42
    {
43 1
        return $this->displayName;
44
    }
45
}
46