1 | <?php |
||
19 | class SecurityConsultant implements UserInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var Contract |
||
23 | */ |
||
24 | private $consultant; |
||
25 | |||
26 | /** |
||
27 | * @var Role[] |
||
28 | */ |
||
29 | private $roles; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * Constructor of the class. |
||
34 | * |
||
35 | * @param Contract $consultant contract |
||
36 | * @param Role[] $roles roles for the contract |
||
37 | */ |
||
38 | public function __construct(Consultant $consultant, array $roles = array()) |
||
43 | |||
44 | /** |
||
45 | * Returns the roles granted to the user. |
||
46 | * |
||
47 | * @return Role[] The user roles |
||
48 | */ |
||
49 | public function getRoles() |
||
53 | |||
54 | /** |
||
55 | * Returns the password used to authenticate the user. |
||
56 | * |
||
57 | * @return string The password |
||
58 | */ |
||
59 | public function getPassword() |
||
63 | |||
64 | /** |
||
65 | * Returns the salt that was originally used to encode the password. |
||
66 | * |
||
67 | * @return null The salt |
||
68 | */ |
||
69 | public function getSalt() |
||
73 | |||
74 | /** |
||
75 | * Returns the username used to authenticate the user. |
||
76 | * |
||
77 | * @return string The username |
||
78 | */ |
||
79 | public function getUsername() |
||
83 | |||
84 | /** |
||
85 | * Removes sensitive data from the user. |
||
86 | * |
||
87 | * This is important if, at any given point, sensitive information like |
||
88 | * the plain-text password is stored on this object. |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | public function eraseCredentials() |
||
95 | |||
96 | /** |
||
97 | * Provides the consultant object. |
||
98 | * |
||
99 | * @return Contract |
||
100 | */ |
||
101 | public function getConsultant() |
||
105 | } |
||
106 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..