File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/Symfony/Component/Security/Core/User Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 18
18
* This is particularly useful with self-contained access tokens.
19
19
*
20
20
* @experimental
21
+ *
22
+ * @template TUser of UserInterface
23
+ * @template-extends UserProviderInterface<TUser>
21
24
*/
22
25
interface AttributesBasedUserProviderInterface extends UserProviderInterface
23
26
{
@@ -27,6 +30,8 @@ interface AttributesBasedUserProviderInterface extends UserProviderInterface
27
30
* This method must throw UserNotFoundException if the user is not found.
28
31
*
29
32
* @throws UserNotFoundException
33
+ *
34
+ * @return TUser
30
35
*/
31
36
public function loadUserByIdentifier (string $ identifier , array $ attributes = []): UserInterface ;
32
37
}
Original file line number Diff line number Diff line change 28
28
* information is submitted or what the UserInterface object looks like.
29
29
*
30
30
* @author Fabien Potencier <fabien@symfony.com>
31
+ *
32
+ * @template TUser of UserInterface
31
33
*/
32
34
interface UserProviderInterface
33
35
{
@@ -40,6 +42,7 @@ interface UserProviderInterface
40
42
* map.
41
43
*
42
44
* @return UserInterface
45
+ * @psalm-return TUser
43
46
*
44
47
* @throws UnsupportedUserException if the user is not supported
45
48
* @throws UserNotFoundException if the user is not found
@@ -49,6 +52,8 @@ public function refreshUser(UserInterface $user);
49
52
/**
50
53
* Whether this provider supports the given user class.
51
54
*
55
+ * @param class-string<TUser> $class
56
+ *
52
57
* @return bool
53
58
*/
54
59
public function supportsClass (string $ class );
@@ -59,6 +64,8 @@ public function supportsClass(string $class);
59
64
* This method must throw UserNotFoundException if the user is not found.
60
65
*
61
66
* @throws UserNotFoundException
67
+ *
68
+ * @return TUser
62
69
*/
63
70
public function loadUserByIdentifier (string $ identifier ): UserInterface ;
64
71
}
You can’t perform that action at this time.
0 commit comments