| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 9 | CRAP |  | 0.00% | 0 / 76
Member |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 9 | 90 |  | 0.00% | 0 / 70
__construct($username, $password = '', $salt = '', $roles = array() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 7
getUsername() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 4
getSalt() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 4
getPassword() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 4
getRoles() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 4
eraseCredentials() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 3
setfullname($fullname) |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 5
getFullName() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 4
getLink() |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 4

1 | <?php
2 |
3 | namespace BodyRep\Entity;
4 |
5 | use Doctrine\ORM\Mapping as ORM;
6 | use Symfony\Component\Security\Core\User\UserInterface;
7 |
8 | /**
9 | * Bodyrep\Entity\Member
10 | *
11 | * @ORM\Table(name="member")
12 | * @ORM\Entity(repositoryClass="BodyRep\Entity\UserRepository")
13 | */
14 | class Member implements UserInterface
15 | {
16 | /**
17 | * @ORM\Column(type="integer")
18 | * @ORM\Id
19 | * @ORM\GeneratedValue(strategy="AUTO")
20 | */
21 | private $id;
22 |
23 | /**
24 | * @ORM\Column(type="string", length=25, unique=true)
25 | */
26 | private $username;
27 |
28 | /**
29 | * @var string $fullname
30 | *
31 | * @ORM\Column(name="fullname", type="string")
32 | */
33 | private $fullname;
34 | /**
35 | * @ORM\Column(type="string", length=32)
36 | */
37 | private $salt;
38 |
39 | /**
40 | * @ORM\Column(type="string", length=40)
41 | */
42 | private $password;
43 |
44 | /**
45 | * @ORM\Column(type="string", length=60, unique=true)
46 | */
47 | private $email;
48 |
49 | /**
50 | * @ORM\Column(name="active", type="integer")
51 | */
52 | private $isActive;
53 |
54 | private $roles;
55 |
56 | public function __construct($username, $password = '', $salt = '', $roles = array())
57 | {
58 | $this->username = $username;
59 | $this->password = $password;
60 | $this->salt = $salt;
61 | $this->roles = $roles;
62 | }
63 |
64 | /**
65 | * @inheritDoc
66 | */
67 | public function getUsername()
68 | {
69 | return $this->username;
70 | }
71 |
72 |
73 | /**
74 | * @inheritDoc
75 | */
76 | public function getSalt()
77 | {
78 | return $this->salt;
79 | }
80 |
81 | /**
82 | * @inheritDoc
83 | */
84 | public function getPassword()
85 | {
86 | return $this->password;
87 | }
88 |
89 | /**
90 | * @inheritDoc
91 | */
92 | public function getRoles()
93 | {
94 | return array('ROLE_USER');
95 | }
96 |
97 | /**
98 | * @inheritDoc
99 | */
100 | public function eraseCredentials()
101 | {
102 | }
103 |
104 | /**
105 | * Set fullName
106 | *
107 | * @param string $fullname
108 | * @return Member
109 | */
110 | public function setfullname($fullname)
111 | {
112 | $this->fullname = $fullname;
113 |
114 | return $this;
115 | }
116 |
117 | /**
118 | * Get fullName
119 | *
120 | * @return string
121 | */
122 | public function getFullName()
123 | {
124 | return $this->fullname;
125 | }
126 | /**
127 | * Get fullName
128 | *
129 | * @return string
130 | */
131 | public function getLink()
132 | {
133 | return '/app_dev.php/' . $this->getUsername();
134 | }
135 | }