diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php index 3758dbf45b..8a91d0438b 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -31,7 +31,7 @@ abstract class AbstractToken implements TokenInterface private $attributes = []; /** - * @param (Role|string)[] $roles An array of roles + * @param string[] $roles An array of roles * * @throws \InvalidArgumentException */ @@ -41,7 +41,7 @@ abstract class AbstractToken implements TokenInterface if (\is_string($role)) { $role = new Role($role, false); } elseif (!$role instanceof Role) { - throw new \InvalidArgumentException(sprintf('$roles must be an array of strings or Role instances, but got %s.', \gettype($role))); + throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, but got %s.', \gettype($role))); } $this->roles[] = $role; diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php index f9333bc7af..8c658060ad 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Security\Core\Authentication\Token; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\User\UserInterface; /** @@ -26,7 +25,7 @@ class AnonymousToken extends AbstractToken /** * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client * @param string|\Stringable|UserInterface $user - * @param (Role|string)[] $roles + * @param string[] $roles */ public function __construct(string $secret, $user, array $roles = []) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php index 3555eef9bb..eb20f7fe6b 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Security\Core\Authentication\Token; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\User\UserInterface; /** @@ -28,7 +27,7 @@ class PreAuthenticatedToken extends AbstractToken * @param string|\Stringable|UserInterface $user * @param mixed $credentials * @param string $providerKey - * @param (Role|string)[] $roles + * @param string[] $roles */ public function __construct($user, $credentials, string $providerKey, array $roles = []) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php index bd22eb6206..2b493c70f3 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Security\Core\Authentication\Token; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\User\UserInterface; /** @@ -28,7 +27,7 @@ class UsernamePasswordToken extends AbstractToken * @param string|\Stringable|UserInterface $user The username (like a nickname, email address, etc.) or a UserInterface instance * @param mixed $credentials * @param string $providerKey - * @param (Role|string)[] $roles + * @param string[] $roles * * @throws \InvalidArgumentException */