Completed
Push — master ( d3482a...f021c8 )
by Hugues
02:16
created

ResetPassword::getUserId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace src\Command;
4
5
use HMLB\DDD\Entity\Identity;
6
7
/**
8
 * Reset a password after forgetting it.
9
 *
10
 * @author Hugues Maignol <[email protected]>
11
 */
12
final class ResetPassword
13
{
14
    /**
15
     * @var string
16
     */
17
    private $password;
18
19
    /**
20
     * @var string
21
     */
22
    private $resetToken;
23
24
    /**
25
     * @var Identity
26
     */
27
    private $userId;
28
29
    public function __construct(string $password, string $resetToken, Identity $userId)
30
    {
31
        $this->password = $password;
32
        $this->resetToken = $resetToken;
33
        $this->userId = $userId;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getPassword(): string
40
    {
41
        return $this->password;
42
    }
43
44
    /**
45
     * Getter de resetToken
46
     *
47
     * @return string
48
     */
49
    public function getResetToken()
50
    {
51
        return $this->resetToken;
52
    }
53
54
    /**
55
     * @return Identity
56
     */
57
    public function getUserId(): Identity
58
    {
59
        return $this->userId;
60
    }
61
}
62