minor #12310 Improved the phpdoc for security token classes (stof)

This PR was merged into the 2.3 branch.

Discussion
----------

Improved the phpdoc for security token classes

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This will avoid to have Scrutinizer complaining that we pass an array of string rather than an array of RoleInterface for instance.

Commits
-------

7b6d115 Improved the phpdoc for security token classes
This commit is contained in:
Fabien Potencier 2014-10-24 19:46:43 +02:00
commit 39d91b9f43
2 changed files with 5 additions and 5 deletions

View File

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

View File

@ -26,10 +26,10 @@ class UsernamePasswordToken extends AbstractToken
/**
* Constructor.
*
* @param string $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method.
* @param string $credentials This usually is the password of the user
* @param string $providerKey The provider key
* @param RoleInterface[] $roles An array of roles
* @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method.
* @param string $credentials This usually is the password of the user
* @param string $providerKey The provider key
* @param RoleInterface[]|string[] $roles An array of roles
*
* @throws \InvalidArgumentException
*/