ChangeUserPasswordCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 67
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A id() 0 4 1
A newPlainPassword() 0 4 1
A oldPlainPassword() 0 4 1
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\Command\ChangePassword;
14
15
/**
16
 * Change user password command class.
17
 *
18
 * @author Beñat Espiña <[email protected]>
19
 * @author Gorka Laucirica <[email protected]>
20
 */
21
class ChangeUserPasswordCommand
22
{
23
    /**
24
     * The user id.
25
     *
26
     * @var string
27
     */
28
    private $id;
29
30
    /**
31
     * The new plain password.
32
     *
33
     * @var string
34
     */
35
    private $newPlainPassword;
36
37
    /**
38
     * The old plain password.
39
     *
40
     * @var string
41
     */
42
    private $oldPlainPassword;
43
44
    /**
45
     * Constructor.
46
     *
47
     * @param string $anId               The user id
48
     * @param string $aNewPlainPassword  The new plain password
49
     * @param string $anOldPlainPassword The old plain password
50
     */
51
    public function __construct($anId, $aNewPlainPassword, $anOldPlainPassword)
52
    {
53
        $this->id = $anId;
54
        $this->newPlainPassword = $aNewPlainPassword;
55
        $this->oldPlainPassword = $anOldPlainPassword;
56
    }
57
58
    /**
59
     * Gets the user id.
60
     *
61
     * @return string
62
     */
63
    public function id()
64
    {
65
        return $this->id;
66
    }
67
68
    /**
69
     * Gets the new plain password.
70
     *
71
     * @return string
72
     */
73
    public function newPlainPassword()
74
    {
75
        return $this->newPlainPassword;
76
    }
77
78
    /**
79
     * Gets the old plain password.
80
     *
81
     * @return string
82
     */
83
    public function oldPlainPassword()
84
    {
85
        return $this->oldPlainPassword;
86
    }
87
}
88