Skip to content

Commit fb30f91

Browse files
[Security] phpdoc cleanups
1 parent 4513525 commit fb30f91

File tree

9 files changed

+16
-39
lines changed

9 files changed

+16
-39
lines changed

Authentication/RememberMe/PersistentTokenInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Interface to be implemented by persistent token classes (such as
1616
* Doctrine entities representing a remember-me token).
1717
*
18-
* @method string getUserIdentifier() returns the identifier used to authenticate (e.g. their e-mailaddress or username)
18+
* @method string getUserIdentifier() returns the identifier used to authenticate (e.g. their email address or username)
1919
*
2020
* @author Johannes M. Schmitt <[email protected]>
2121
*/

Authentication/Token/AbstractToken.php

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function getUsername(/* $legacy = true */)
6666
return (string) $this->user;
6767
}
6868

69+
/**
70+
* {@inheritdoc}
71+
*/
6972
public function getUserIdentifier(): string
7073
{
7174
// method returns "null" in non-legacy mode if not overridden
@@ -208,41 +211,31 @@ public function __unserialize(array $data): void
208211
}
209212

210213
/**
211-
* Returns the token attributes.
212-
*
213-
* @return array
214+
* {@inheritdoc}
214215
*/
215216
public function getAttributes()
216217
{
217218
return $this->attributes;
218219
}
219220

220221
/**
221-
* Sets the token attributes.
222-
*
223-
* @param array $attributes The token attributes
222+
* {@inheritdoc}
224223
*/
225224
public function setAttributes(array $attributes)
226225
{
227226
$this->attributes = $attributes;
228227
}
229228

230229
/**
231-
* Returns true if the attribute exists.
232-
*
233-
* @return bool
230+
* {@inheritdoc}
234231
*/
235232
public function hasAttribute(string $name)
236233
{
237234
return \array_key_exists($name, $this->attributes);
238235
}
239236

240237
/**
241-
* Returns an attribute value.
242-
*
243-
* @return mixed
244-
*
245-
* @throws \InvalidArgumentException When attribute doesn't exist for this token
238+
* {@inheritdoc}
246239
*/
247240
public function getAttribute(string $name)
248241
{
@@ -254,9 +247,7 @@ public function getAttribute(string $name)
254247
}
255248

256249
/**
257-
* Sets an attribute.
258-
*
259-
* @param mixed $value The attribute value
250+
* {@inheritdoc}
260251
*/
261252
public function setAttribute(string $name, $value)
262253
{

Authentication/Token/RememberMeToken.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ public function getFirewallName(): string
8181
}
8282

8383
/**
84-
* Returns the secret.
85-
*
8684
* @return string
8785
*/
8886
public function getSecret()

Authentication/Token/TokenInterface.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* TokenInterface is the interface for the user authentication information.
1818
*
19-
* @method string getUserIdentifier() returns the user identifier used during authentication (e.g. a user's e-mailaddress or username)
19+
* @method string getUserIdentifier() returns the user identifier used during authentication (e.g. a user's email address or username)
2020
*
2121
* @author Fabien Potencier <[email protected]>
2222
* @author Johannes M. Schmitt <[email protected]>
@@ -44,7 +44,7 @@ public function getRoleNames(): array;
4444
*
4545
* @return mixed
4646
*
47-
* @deprecated since 5.4
47+
* @deprecated since Symfony 5.4
4848
*/
4949
public function getCredentials();
5050

@@ -88,38 +88,28 @@ public function setAuthenticated(bool $isAuthenticated);
8888
public function eraseCredentials();
8989

9090
/**
91-
* Returns the token attributes.
92-
*
9391
* @return array
9492
*/
9593
public function getAttributes();
9694

9795
/**
98-
* Sets the token attributes.
99-
*
10096
* @param array $attributes The token attributes
10197
*/
10298
public function setAttributes(array $attributes);
10399

104100
/**
105-
* Returns true if the attribute exists.
106-
*
107101
* @return bool
108102
*/
109103
public function hasAttribute(string $name);
110104

111105
/**
112-
* Returns an attribute value.
113-
*
114106
* @return mixed
115107
*
116108
* @throws \InvalidArgumentException When attribute doesn't exist for this token
117109
*/
118110
public function getAttribute(string $name);
119111

120112
/**
121-
* Sets an attribute.
122-
*
123113
* @param mixed $value The attribute value
124114
*/
125115
public function setAttribute(string $name, $value);

Exception/AuthenticationException.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class AuthenticationException extends RuntimeException
2424
private $token;
2525

2626
/**
27-
* Get the token.
28-
*
2927
* @return TokenInterface|null
3028
*/
3129
public function getToken()

Exception/UserNotFoundException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getMessageKey()
3030
}
3131

3232
/**
33-
* Get the user identifier (e.g. username or e-mailaddress).
33+
* Get the user identifier (e.g. username or email address).
3434
*/
3535
public function getUserIdentifier(): ?string
3636
{
@@ -50,7 +50,7 @@ public function getUsername()
5050
}
5151

5252
/**
53-
* Set the user identifier (e.g. username or e-mailaddress).
53+
* Set the user identifier (e.g. username or email address).
5454
*/
5555
public function setUserIdentifier(string $identifier): void
5656
{

User/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function getUsername(): string
9191
}
9292

9393
/**
94-
* Returns the identifier for this user (e.g. its username or e-mailaddress).
94+
* Returns the identifier for this user (e.g. its username or email address).
9595
*/
9696
public function getUserIdentifier(): string
9797
{

User/UserInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @see UserProviderInterface
2828
*
29-
* @method string getUserIdentifier() returns the identifier for this user (e.g. its username or e-mailaddress)
29+
* @method string getUserIdentifier() returns the identifier for this user (e.g. its username or email address)
3030
*
3131
* @author Fabien Potencier <[email protected]>
3232
*/

User/UserProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Represents a class that loads UserInterface objects from some source for the authentication system.
1919
*
2020
* In a typical authentication configuration, a user identifier (e.g. a
21-
* username or e-mailaddress) credential enters the system (via form login, or
21+
* username or email address) credential enters the system (via form login, or
2222
* any method). The user provider that is configured with that authentication
2323
* method is asked to load the UserInterface object for the given identifier (via
2424
* loadUserByIdentifier) so that the rest of the process can continue.

0 commit comments

Comments
 (0)