Completed
Pull Request — master (#10)
by
unknown
05:51 queued 02:49
created

UpdateUser   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 82
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 5
c 3
b 0
f 1
lcom 0
cbo 0
dl 0
loc 82
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getUser() 0 4 1
A getUsername() 0 4 1
A getPassword() 0 4 1
A getDisplayName() 0 4 1
1
<?php
2
3
namespace SumoCoders\FrameworkMultiUserBundle\Command;
4
5
use SumoCoders\FrameworkMultiUserBundle\User\User;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
class UpdateUser
9
{
10
    /**
11
     * @var User
12
     * @Assert\NotNull()
13
     */
14
    private $user;
15
16
    /**
17
     * @var string
18
     * @Assert\NotBlank()
19
     */
20
    private $username;
21
22
    /**
23
     * @var string
24
     * @Assert\NotBlank()
25
     */
26
    private $password;
27
28
    /**
29
     * @var string
30
     * @Assert\NotBlank()
31
     */
32
    private $displayName;
33
34
    /**
35
     * UpdateUser constructor.
36
     *
37
     * @param User $user
38
     * @param $username
39
     * @param $password
40
     * @param $displayName
41
     */
42
    public function __construct(User $user, $username, $password, $displayName)
43
    {
44
        $this->user = $user;
45
        $this->username = $username;
46
        $this->password = $password;
47
        $this->displayName = $displayName;
48
    }
49
50
    /**
51
     * Get the User.
52
     *
53
     * @return User
54
     */
55
    public function getUser()
56
    {
57
        return $this->user;
58
    }
59
60
    /**
61
     * Get the username.
62
     *
63
     * @return string
64
     */
65
    public function getUsername()
66
    {
67
        return $this->username;
68
    }
69
70
    /**
71
     * Get the password.
72
     *
73
     * @return string
74
     */
75
    public function getPassword()
76
    {
77
        return $this->password;
78
    }
79
80
    /**
81
     * Get the displayName.
82
     *
83
     * @return string
84
     */
85
    public function getDisplayName()
86
    {
87
        return $this->displayName;
88
    }
89
}
90