Skip to content

Commit a5305a5

Browse files
authored
Update user_providers.rst
Adding return type to serveral functions
1 parent 2e334ef commit a5305a5

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
@@ -314,7 +314,7 @@ command will generate a nice skeleton to get you started::
314314
*
315315
* @return UserInterface
316316
*/
317-
public function refreshUser(UserInterface $user)
317+
public function refreshUser(UserInterface $user): UserInterface
318318
{
319319
if (!$user instanceof User) {
320320
throw new UnsupportedUserException(sprintf('Invalid user class "%s".', get_class($user)));
@@ -328,7 +328,7 @@ command will generate a nice skeleton to get you started::
328328
/**
329329
* Tells Symfony to use this provider for this User class.
330330
*/
331-
public function supportsClass(string $class)
331+
public function supportsClass(string $class): bool
332332
{
333333
return User::class === $class || is_subclass_of($class, User::class);
334334
}

0 commit comments

Comments
 (0)