[Security] Update user phpdoc on tokens

This commit is contained in:
Roland Franssen 2018-07-13 15:34:18 +02:00 committed by Fabien Potencier
parent f80376217d
commit 7306018a30
2 changed files with 10 additions and 12 deletions

View File

@ -77,14 +77,7 @@ abstract class AbstractToken implements TokenInterface
} }
/** /**
* Sets the user in the token. * {@inheritdoc}
*
* The user can be a UserInterface instance, or an object implementing
* a __toString method or the username as a regular string.
*
* @param string|object $user The user
*
* @throws \InvalidArgumentException
*/ */
public function setUser($user) public function setUser($user)
{ {

View File

@ -47,17 +47,22 @@ interface TokenInterface extends \Serializable
/** /**
* Returns a user representation. * Returns a user representation.
* *
* @return mixed Can be a UserInterface instance, an object implementing a __toString method, * @return string|object Can be a UserInterface instance, an object implementing a __toString method,
* or the username as a regular string * or the username as a regular string
* *
* @see AbstractToken::setUser() * @see AbstractToken::setUser()
*/ */
public function getUser(); public function getUser();
/** /**
* Sets a user. * Sets the user in the token.
* *
* @param mixed $user * The user can be a UserInterface instance, or an object implementing
* a __toString method or the username as a regular string.
*
* @param string|object $user The user
*
* @throws \InvalidArgumentException
*/ */
public function setUser($user); public function setUser($user);