1 | <?php |
||
26 | class User implements AdvancedUserInterface, \Serializable |
||
27 | { |
||
28 | /** |
||
29 | * @ORM\Column(type="integer") |
||
30 | * @ORM\Id |
||
31 | * @ORM\GeneratedValue(strategy="AUTO") |
||
32 | */ |
||
33 | private $id; |
||
34 | |||
35 | /** |
||
36 | * @ORM\Column(type="string", length=25, unique=true) |
||
37 | */ |
||
38 | private $username; |
||
39 | |||
40 | /** |
||
41 | * @ORM\Column(type="string", length=64) |
||
42 | */ |
||
43 | private $password; |
||
44 | |||
45 | /** |
||
46 | * @ORM\Column(type="string", length=254, unique=true) |
||
47 | */ |
||
48 | private $email; |
||
49 | |||
50 | /** |
||
51 | * @ORM\Column(type="array") |
||
52 | */ |
||
53 | private $roles; |
||
54 | |||
55 | /** |
||
56 | * @ORM\Column(name="is_active", type="boolean") |
||
57 | */ |
||
58 | private $isActive; |
||
59 | |||
60 | public function __construct() |
||
66 | |||
67 | public function getUsername() |
||
71 | |||
72 | public function getEmail() |
||
76 | |||
77 | public function getSalt() |
||
83 | |||
84 | public function getPassword() |
||
88 | |||
89 | public function getRoles() |
||
93 | |||
94 | public function eraseCredentials() |
||
97 | |||
98 | public function isAccountNonExpired() |
||
114 | |||
115 | /** @see \Serializable::serialize() */ |
||
116 | public function serialize() |
||
127 | |||
128 | /** @see \Serializable::unserialize() */ |
||
129 | public function unserialize($serialized) |
||
140 | |||
141 | public function getId(): ?int |
||
145 | |||
146 | public function setUsername(string $username): self |
||
152 | |||
153 | public function setPassword(string $password): self |
||
159 | |||
160 | public function setEmail(string $email): self |
||
166 | |||
167 | public function getIsActive(): ?bool |
||
171 | |||
172 | public function setIsActive(bool $isActive): self |
||
178 | |||
179 | public function setRoles(array $roles): self |
||
180 | { |
||
181 | $this->roles = $roles; |
||
182 | |||
183 | return $this; |
||
184 | } |
||
185 | } |
||
186 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.