Completed
Push — master ( f021c8...431426 )
by Hugues
16:56
created

PasswordReset::getNewPassword()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %
Metric Value
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace HMLB\UserBundle\Event;
4
5
use HMLB\DDD\Entity\Identity;
6
7
/**
8
 * PasswordReset
9
 *
10
 * @author Hugues Maignol <[email protected]>
11
 */
12 View Code Duplication
final class PasswordReset extends UserEvent
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
    /**
15
     * @var Identity
16
     */
17
    private $userId;
18
19
    /**
20
     * @var string
21
     */
22
    private $oldPassword;
23
24
    /**
25
     * @var string
26
     */
27
    private $newPassword;
28
29
    public function __construct(Identity $userId, string $oldPassword, string $newPassword)
30
    {
31
        $this->userId = $userId;
32
        $this->oldPassword = $oldPassword;
33
        $this->newPassword = $newPassword;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getOldPassword(): string
40
    {
41
        return $this->oldPassword;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getNewPassword(): string
48
    {
49
        return $this->newPassword;
50
    }
51
52
    /**
53
     * @return Identity
54
     */
55
    public function getUserId(): Identity
56
    {
57
        return $this->userId;
58
    }
59
}
60