From e706847b8caec5a14f72667f5e99dc184b929c7e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 16 Jun 2020 08:39:40 +0200 Subject: [PATCH] Remove obsolete methods --- .../Authentication/Token/ConnectToken.php | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/src/Security/Authentication/Token/ConnectToken.php b/src/Security/Authentication/Token/ConnectToken.php index 9c9513a..59855c6 100644 --- a/src/Security/Authentication/Token/ConnectToken.php +++ b/src/Security/Authentication/Token/ConnectToken.php @@ -120,26 +120,4 @@ private function getUserRoles(UserInterface $user) return array_map([$this, $callBackMethod], $user->getRoles()); } - - private function getStringUserRole($role) - { - if (!\is_string($role) && !($role instanceof Role)) { - throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, or Role instances, but got %s.', \gettype($role))); - } - - return (string) $role; - } - - private function getObjectUserRole($role) - { - if (\is_string($role)) { - return new Role($role); - } - - if (!$role instanceof RoleInterface) { - throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, or RoleInterface instances, but got %s.', \gettype($role))); - } - - return $role; - } }