User   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 23
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getIdentifier() 0 3 1
A __construct() 0 4 1
A getUsername() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DH\Auditor\User;
6
7
final class User implements UserInterface
8
{
9
    private ?string $id;
10
11
    private ?string $username;
12
13
    /**
14
     * User constructor.
15
     */
16
    public function __construct(?string $id = null, ?string $username = null)
17
    {
18
        $this->id = $id;
19
        $this->username = $username;
20
    }
21
22
    public function getIdentifier(): ?string
23
    {
24
        return $this->id;
25
    }
26
27
    public function getUsername(): ?string
28
    {
29
        return $this->username;
30
    }
31
}
32