Skip to content

Commit

Permalink
[Security/Core] fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Mar 13, 2020
1 parent cc36bca commit aff6ffd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Authentication/Token/AbstractToken.php
Expand Up @@ -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
*/
Expand All @@ -41,7 +41,7 @@ public function __construct(array $roles = [])
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;
Expand Down
3 changes: 1 addition & 2 deletions Authentication/Token/AnonymousToken.php
Expand Up @@ -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;

/**
Expand All @@ -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 = [])
{
Expand Down
3 changes: 1 addition & 2 deletions Authentication/Token/PreAuthenticatedToken.php
Expand Up @@ -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;

/**
Expand All @@ -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 = [])
{
Expand Down
3 changes: 1 addition & 2 deletions Authentication/Token/UsernamePasswordToken.php
Expand Up @@ -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;

/**
Expand All @@ -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
*/
Expand Down

0 comments on commit aff6ffd

Please sign in to comment.