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); }