8000 minor #27940 [Security] Update user phpdoc on tokens (ro0NL) · symfony/symfony@091f9ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 091f9ff

Browse files
committed
minor #27940 [Security] Update user phpdoc on tokens (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #27940). Discussion ---------- [Security] Update user phpdoc on tokens | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> As implemented here: https://github.com/symfony/symfony/blob/1e16a8b979683a7136d30e37eec7b401586ad940/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php#L78-L88 Note IMHO `string|object` is intended, and used consistently elsewhere, e.g.: https://github.com/symfony/symfony/blob/f80376217d33490fcb9592262c5ac5a08519a7f9/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php#L27 Commits ------- 7306018 [Security] Update user phpdoc on tokens
2 parents 7acf16e + 7306018 commit 091f9ff

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,7 @@ public function getUser()
7777
}
7878

7979
/**
80-
* Sets the user in the token.
81-
*
82-
* The user can be a UserInterface instance, or an object implementing
83-
* a __toString method or the username as a regular string.
84-
*
85-
* @param string|object $user The user
86-
*
87-
* @throws \InvalidArgumentException
80+
* {@inheritdoc}
8881
*/
8982
public function setUser($user)
9083
{

src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,22 @@ public function getCredentials();
4747
/**
4848
* Returns a user representation.
4949
*
50-
* @return mixed Can be a UserInterface instance, an object implementing a __toString method,
51-
* or the username as a regular string
50+
* @return string|object Can be a UserInterface instance, an object implementing a __toString method,
51+
* or the username as a regular string
5252
*
5353
* @see AbstractToken::setUser()
5454
*/
5555
public function getUser();
5656

5757
/**
58-
* Sets a user.
58+
* Sets the user in the token.
5959
*
60-
* @param mixed $user
60+
* The user can be a UserInterface instance, or an object implementing
61+
* a __toString method or the username as a regular string.
62+
*
63+
* @param string|object $user The user
64+
*
65+
* @throws \InvalidArgumentException
6166
*/
6267
public function setUser($user);
6368

0 commit comments

Comments
 (0)
0