Completed
Push — master ( 728b57...1a78ff )
by Beñat
03:57
created

WithConfirmationSignUpUserCommand::password()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the BenGorUser package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace BenGorUser\User\Application\Service\SignUp;
14
15
/**
16
 * With confirmation sign up user command class.
17
 *
18
 * @author Beñat Espiña <[email protected]>
19
 * @author Gorka Laucirica <[email protected]>
20
 */
21 View Code Duplication
class WithConfirmationSignUpUserCommand
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...
22
{
23
    /**
24
     * The user email.
25
     *
26
     * @var string
27
     */
28
    private $email;
29
30
    /**
31
     * The plain password.
32
     *
33
     * @var string
34
     */
35
    private $plainPassword;
36
37
    /**
38
     * Array which contains the roles.
39
     *
40
     * @var array
41
     */
42
    private $roles;
43
44
    /**
45
     * Constructor.
46
     *
47
     * @param string $anEmail        The email
48
     * @param string $aPlainPassword The plain password
49
     * @param array  $roles          Array which contains the roles
50
     */
51
    public function __construct($anEmail, $aPlainPassword, array $roles)
52
    {
53
        $this->email = $anEmail;
54
        $this->plainPassword = $aPlainPassword;
55
        $this->roles = $roles;
56
    }
57
58
    /**
59
     * Gets the email.
60
     *
61
     * @return string
62
     */
63
    public function email()
64
    {
65
        return $this->email;
66
    }
67
68
    /**
69
     * Gets the user plain password.
70
     *
71
     * @return string
72
     */
73
    public function password()
74
    {
75
        return $this->plainPassword;
76
    }
77
78
    /**
79
     * Gets the roles.
80
     *
81
     * @return array
82
     */
83
    public function roles()
84
    {
85
        return $this->roles;
86
    }
87
}
88