This commit is contained in:
Nicolas Grekas 2020-03-13 11:30:33 +01:00
parent cbb9d01b6c
commit 523f5c04ab

View File

@ -41,7 +41,7 @@ abstract class AbstractToken implements TokenInterface
if (\is_string($role)) { if (\is_string($role)) {
$role = new Role($role); $role = new Role($role);
} elseif (!$role instanceof RoleInterface) { } elseif (!$role instanceof RoleInterface) {
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, Role instances, but got %s.', \gettype($role))); throw new \InvalidArgumentException(sprintf('$roles must be an array of strings or Role instances, but got %s.', \gettype($role)));
} }
$this->roles[] = $role; $this->roles[] = $role;