src/Charcoal/User/AuthToken.php 1 location
|
@@ 105-114 (lines=10) @@
|
102 |
|
* @throws InvalidArgumentException If the username is not a string. |
103 |
|
* @return AuthToken Chainable |
104 |
|
*/ |
105 |
|
public function setUsername($username) |
106 |
|
{ |
107 |
|
if (!is_string($username)) { |
108 |
|
throw new InvalidArgumentException( |
109 |
|
'Set user username: Username must be a string' |
110 |
|
); |
111 |
|
} |
112 |
|
$this->username = mb_strtolower($username); |
113 |
|
return $this; |
114 |
|
} |
115 |
|
|
116 |
|
/** |
117 |
|
* @return string |
src/Charcoal/User/AbstractUser.php 1 location
|
@@ 118-127 (lines=10) @@
|
115 |
|
* @throws InvalidArgumentException If the username is not a string. |
116 |
|
* @return UserInterface Chainable |
117 |
|
*/ |
118 |
|
public function setUsername($username) |
119 |
|
{ |
120 |
|
if (!is_string($username)) { |
121 |
|
throw new InvalidArgumentException( |
122 |
|
'Set user username: Username must be a string' |
123 |
|
); |
124 |
|
} |
125 |
|
|
126 |
|
$this->username = mb_strtolower($username); |
127 |
|
|
128 |
|
return $this; |
129 |
|
} |
130 |
|
|