10000 Update user_providers.rst · symfony/symfony-docs@2ea62fa · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ea62fa

Browse files
hbgamraOskarStark
authored andcommitted
Update user_providers.rst
Adding return type to serveral functions
1 parent 8ee4dc1 commit 2ea62fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/user_providers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ command will generate a nice skeleton to get you started::
328328
*
329329
* @return UserInterface
330330
*/
331-
public function refreshUser(UserInterface $user)
331+
public function refreshUser(UserInterface $user): UserInterface
332332
{
333333
if (!$user instanceof User) {
334334
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::
342342
/**
343343
* Tells Symfony to use this provider for this User class.
344344
*/
345-
public function supportsClass(string $class)
345+
public function supportsClass(string $class): bool
346346
{
347347
return User::class === $class || is_subclass_of($class, User::class);
348348
}

0 commit comments

Comments
 (0)
0