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:
commit
39d91b9f43
@ -88,7 +88,7 @@ abstract class AbstractToken implements TokenInterface
|
|||||||
* The user can be a UserInterface instance, or an object implementing
|
* The user can be a UserInterface instance, or an object implementing
|
||||||
* a __toString method or the username as a regular string.
|
* a __toString method or the username as a regular string.
|
||||||
*
|
*
|
||||||
* @param mixed $user The user
|
* @param string|object $user The user
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function setUser($user)
|
public function setUser($user)
|
||||||
|
@ -26,10 +26,10 @@ class UsernamePasswordToken extends AbstractToken
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* 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|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 $credentials This usually is the password of the user
|
||||||
* @param string $providerKey The provider key
|
* @param string $providerKey The provider key
|
||||||
* @param RoleInterface[] $roles An array of roles
|
* @param RoleInterface[]|string[] $roles An array of roles
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user