From 2ea62fab556334be1cb27198adb3c9248977d1b0 Mon Sep 17 00:00:00 2001 From: hbengamra Date: Thu, 13 Apr 2023 00:56:35 +0200 Subject: [PATCH] Update user_providers.rst Adding return type to serveral functions --- security/user_providers.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/user_providers.rst b/security/user_providers.rst index 57c50149bc0..ba7b169f0c9 100644 --- a/security/user_providers.rst +++ b/security/user_providers.rst @@ -328,7 +328,7 @@ command will generate a nice skeleton to get you started:: * * @return UserInterface */ - public function refreshUser(UserInterface $user) + public function refreshUser(UserInterface $user): UserInterface { if (!$user instanceof User) { throw new UnsupportedUserException(sprintf('Invalid user class "%s".', get_class($user))); @@ -342,7 +342,7 @@ command will generate a nice skeleton to get you started:: /** * Tells Symfony to use this provider for this User class. */ - public function supportsClass(string $class) + public function supportsClass(string $class): bool { return User::class === $class || is_subclass_of($class, User::class); }