Completed
Push — master ( cd6d5c...fa5688 )
by Axel
05:46 queued 03:12
created

User   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 6
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 58
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUsername() 0 3 1
A getPassword() 0 3 1
A getSalt() 0 3 1
A getRoles() 0 3 1
A eraseCredentials() 0 3 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Tests\Mock;
4
5
use Symfony\Component\Security\Core\User\UserInterface;
6
7
class User implements UserInterface {
8
    /** @var string **/
9
    protected $username;
10
    /** @var string **/
11
    protected $password;
12
    /** @var string **/
13
    protected $salt;
14
    /** @var array **/
15
    protected $roles;
16
17
    /**
18
     * @param string $username
19
     * @param string $password
20
     * @param string $salt
21
     * @param array $roles
22
     */
23
    public function __construct($username = '', $password = '', $salt = '', $roles = []) {
24
        $this->username = $username;
25
        $this->password = $password;
26
        $this->salt = $salt;
27
        $this->roles = $roles;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getUsername() {
34
        return $this->username;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getPassword() {
41
        return $this->password;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getSalt() {
48
        return $this->salt;
49
    }
50
51
    /**
52
     * @return array
53
     */
54
    public function getRoles() {
55
        return $this->roles;
56
    }
57
58
    /**
59
     * @return boolean
60
     */
61
    public function eraseCredentials() {
62
        return true;
63
    }
64
}
65