| Total Complexity | 11 |
| Total Lines | 96 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class MajimaUser implements UserInterface, EquatableInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $username; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $password; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | private $salt; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var array |
||
| 39 | */ |
||
| 40 | private $roles; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * MajimaUser constructor. |
||
| 44 | * @param $username |
||
| 45 | * @param $password |
||
| 46 | * @param $salt |
||
| 47 | * @param array $roles |
||
| 48 | */ |
||
| 49 | public function __construct($username, $password, $salt, array $roles) |
||
| 50 | { |
||
| 51 | $this->username = $username; |
||
| 52 | $this->password = $password; |
||
| 53 | $this->salt = $salt; |
||
| 54 | $this->roles = $roles; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | public function getRoles() |
||
| 61 | { |
||
| 62 | return $this->roles; |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public function getPassword() |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | public function getSalt() |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | public function getUsername() |
||
| 85 | { |
||
| 86 | return $this->username; |
||
| 87 | } |
||
| 88 | |||
| 89 | public function eraseCredentials() |
||
| 90 | { |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @param UserInterface $user |
||
| 95 | * @return bool |
||
| 96 | */ |
||
| 97 | public function isEqualTo(UserInterface $user) |
||
| 116 | } |
||
| 117 | } |