User::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 2
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