File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ final class User implements
3131 */
3232 private $ accountNonLocked ;
3333
34+ private $ name ;
3435 private $ password ;
3536 private $ roles ;
3637
@@ -41,7 +42,7 @@ final class User implements
4142 private $ accountUsers = array ();
4243 private $ policies = array ();
4344
44- public function __construct ($ name )
45+ public function __construct (string $ name )
4546 {
4647 if (empty ($ name )) {
4748 throw new \InvalidArgumentException ('The name cannot be empty. ' );
@@ -57,6 +58,11 @@ public function __construct($name)
5758 $ this ->salt = 'KJH6212kjwek_fj23D01-239.1023fkjdsj^k2hdfssfjk!h234uiy4324 ' ;
5859 }
5960
61+ public function getUserIdentifier (): string
62+ {
63+ return $ this ->name ;
64+ }
65+
6066 public function getCreatedAt ()
6167 {
6268 return $ this ->createdAt ;
@@ -130,7 +136,7 @@ public function getUsername()
130136 return $ this ->getName ();
131137 }
132138
133- public function setUsername ($ username )
139+ public function setUsername (string $ username )
134140 {
135141 $ this ->name = $ username ;
136142 return $ this ;
You can’t perform that action at this time.
0 commit comments