Passed
Push — develop ( 370f48...cc396d )
by Laurent
07:33 queued 04:53
created

User::username()   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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the G.L.S.R. Apps package.
7
 *
8
 * (c) Dev-Int Création <[email protected]>.
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Administration\Application\User\ReadModel;
15
16
final class User
17
{
18
    public string $uuid;
19
    public string $username;
20
    public string $email;
21
    public ?string $password;
22
    public array $roles;
23
24
    public function __construct(
25
        string $uuid,
26
        string $username,
27
        string $email,
28
        ?string $password = null,
29
        array $roles = []
30
    ) {
31
        $this->uuid = $uuid;
32
        $this->username = $username;
33
        $this->email = $email;
34
        $this->password = $password;
35
        $this->roles = $roles;
36
    }
37
38
    public function uuid(): ?string
39
    {
40
        return $this->uuid;
41
    }
42
43
    public function username(): string
44
    {
45
        return $this->username;
46
    }
47
48
    public function email(): string
49
    {
50
        return $this->email;
51
    }
52
53
    public function password(): ?string
54
    {
55
        return $this->password;
56
    }
57
58
    public function roles(): array
59
    {
60
        return $this->roles;
61
    }
62
}
63