Passed
Push — feature/VSVGVQ-51 ( 4c3c8b )
by steven
03:08
created

Registration   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 85
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
dl 0
loc 85
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A __construct() 0 12 1
A isPasswordReset() 0 3 1
A getCreatedOn() 0 3 1
A getHashCode() 0 3 1
A getUser() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace VSV\GVQ_API\Registration\Models;
4
5
use Ramsey\Uuid\UuidInterface;
6
use VSV\GVQ_API\User\Models\User;
7
8
class Registration
9
{
10
    /**
11
     * @var UuidInterface
12
     */
13
    private $id;
14
    /**
15
     * @var string
16
     */
17
    private $hashCode;
18
19
    /**
20
     * @var User
21
     */
22
    private $user;
23
24
    /**
25
     * @var \DateTimeImmutable
26
     */
27
    private $createdOn;
28
29
    /**
30
     * @var bool
31
     */
32
    private $passwordReset;
33
34
    /**
35
     * @param UuidInterface $id
36
     * @param string $hashCode
37
     * @param User $user
38
     * @param \DateTimeImmutable $createdOn
39
     * @param bool $passwordReset
40
     */
41
    public function __construct(
42
        UuidInterface $id,
43
        string $hashCode,
44
        User $user,
45
        \DateTimeImmutable $createdOn,
46
        bool $passwordReset
47
    ) {
48
        $this->id = $id;
49
        $this->hashCode = $hashCode;
50
        $this->user = $user;
51
        $this->createdOn = $createdOn;
52
        $this->passwordReset = $passwordReset;
53
    }
54
55
    /**
56
     * @return UuidInterface
57
     */
58
    public function getId(): UuidInterface
59
    {
60
        return $this->id;
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getHashCode(): string
67
    {
68
        return $this->hashCode;
69
    }
70
71
    /**
72
     * @return User
73
     */
74
    public function getUser(): User
75
    {
76
        return $this->user;
77
    }
78
79
    /**
80
     * @return \DateTimeImmutable
81
     */
82
    public function getCreatedOn(): \DateTimeImmutable
83
    {
84
        return $this->createdOn;
85
    }
86
87
    /**
88
     * @return bool
89
     */
90
    public function isPasswordReset(): bool
91
    {
92
        return $this->passwordReset;
93
    }
94
}
95