File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,8 @@ public function supports(TokenInterface $token)
109
109
110
110
/**
111
111
* Retrieves roles from user and appends SwitchUserRole if original token contained one.
112
- *
113
- * @return array The user roles
114
112
*/
115
- private function getRoles (UserInterface $ user , TokenInterface $ token )
113
+ private function getRoles (UserInterface $ user , TokenInterface $ token ): array
116
114
{
117
115
$ roles = $ user ->getRoles ();
118
116
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public function getEncoder($user)
65
65
*
66
66
* @throws \InvalidArgumentException
67
67
*/
68
- private function createEncoder (array $ config )
68
+ private function createEncoder (array $ config ): PasswordEncoderInterface
69
69
{
70
70
if (isset ($ config ['algorithm ' ])) {
71
71
$ config = $ this ->getEncoderConfigFromAlgorithm ($ config );
Original file line number Diff line number Diff line change @@ -93,11 +93,9 @@ public function supportsClass($class)
93
93
/**
94
94
* Returns the user by given username.
95
95
*
96
- * @return User
97
- *
98
96
* @throws UsernameNotFoundException if user whose given username does not exist
99
97
*/
100
- private function getUser (string $ username )
98
+ private function getUser (string $ username ): User
101
99
{
102
100
if (!isset ($ this ->users [strtolower ($ username )])) {
103
101
$ ex = new UsernameNotFoundException (sprintf ('Username "%s" does not exist. ' , $ username ));
You can’t perform that action at this time.
0 commit comments