8000 [Security/Core] fix merge · symfony/symfony@228b59d · GitHub
[go: up one dir, main page]

Skip to content

Commit 228b59d

Browse files
[Security/Core] fix merge
1 parent 1627583 commit 228b59d

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class AbstractToken implements TokenInterface
3131
private $attributes = [];
3232

3333
/**
34-
* @param (Role|string)[] $roles An array of roles
34+
* @param string[] $roles An array of roles
3535
*
3636
* @throws \InvalidArgumentException
3737
*/
@@ -41,7 +41,7 @@ public function __construct(array $roles = [])
4141
if (\is_string($role)) {
4242
$role = new Role($role, false);
4343
} elseif (!$role instanceof Role) {
44-
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings or Role instances, but got %s.', \gettype($role)));
44+
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, but got %s.', \gettype($role)));
4545
}
4646

4747
$this->roles[] = $role;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14-
use Symfony\Component\Security\Core\Role\Role;
1514
use Symfony\Component\Security\Core\User\UserInterface;
1615

1716
/**
@@ -26,7 +25,7 @@ class AnonymousToken extends AbstractToken
2625
/**
2726
* @param string $secret A secret used to make sure the token is created by the app and not by a malicious client
2827
* @param string|\Stringable|UserInterface $user
29-
* @param (Role|string)[] $roles
28+
* @param string[] $roles
3029
*/
3130
public function __construct(string $secret, $user, array $roles = [])
3231
{

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14-
use Symfony\Component\Security\Core\Role\Role;
1514
use Symfony\Component\Security\Core\User\UserInterface;
1615

1716
/**
@@ -28,7 +27,7 @@ class PreAuthenticatedToken extends AbstractToken
2827
* @param string|\Stringable|UserInterface $user
2928
* @param mixed $credentials
3029
* @param string $providerKey
31-
* @param (Role|string)[] $roles
30+
* @param string[] $roles
3231
*/
3332
public function __construct($user, $credentials, string $providerKey, array $roles = [])
3433
{

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14-
use Symfony\Component\Security\Core\Role\Role;
1514
use Symfony\Component\Security\Core\User\UserInterface;
1615

1716
/**
@@ -28,7 +27,7 @@ class UsernamePasswordToken extends AbstractToken
2827
* @param string|\Stringable|UserInterface $user The username (like a nickname, email address, etc.) or a UserInterface instance
2928
* @param mixed $credentials
3029
* @param string $providerKey
31-
* @param (Role|string)[] $roles
30+
* @param string[] $roles
3231
*
3332
* @throws \InvalidArgumentException
3433
*/

0 commit comments

Comments
 (0)
0