Skip to content
Merged

Patch 17 #18197

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions security/user_providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand All @@ -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);
}
Expand Down