Code Duplication    Length = 34-36 lines in 2 locations

src/Command/ChangeEmail.php 1 location

@@ 14-47 (lines=34) @@
11
 *
12
 * @author Hugues Maignol <[email protected]>
13
 */
14
final class ChangeEmail extends UserCommand
15
{
16
    /**
17
     * @var string
18
     */
19
    private $email;
20
21
    /**
22
     * @var Identity
23
     */
24
    private $userId;
25
26
    public function __construct(string $email, Identity $userId)
27
    {
28
        $this->email = $email;
29
        $this->userId = $userId;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getEmail(): string
36
    {
37
        return $this->email;
38
    }
39
40
    /**
41
     * @return Identity
42
     */
43
    public function getUserId(): Identity
44
    {
45
        return $this->userId;
46
    }
47
}
48

src/Event/EmailConfirmed.php 1 location

@@ 14-49 (lines=36) @@
11
 *
12
 * @author Hugues Maignol <[email protected]>
13
 */
14
final class EmailConfirmed extends UserEvent
15
{
16
    /**
17
     * @var Identity
18
     */
19
    private $userId;
20
21
    /**
22
     * @var string
23
     */
24
    private $email;
25
26
    public function __construct(Identity $userId, string $email)
27
    {
28
        $this->userId = $userId;
29
        $this->email = $email;
30
    }
31
32
    /**
33
     * Getter de email.
34
     *
35
     * @return string
36
     */
37
    public function getEmail()
38
    {
39
        return $this->email;
40
    }
41
42
    /**
43
     * @return Identity
44
     */
45
    public function getUserId(): Identity
46
    {
47
        return $this->userId;
48
    }
49
}
50