Skip to content

Commit 2807632

Browse files
committed
Turned return type annotations of private methods into php return types.
1 parent 9c5d874 commit 2807632

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Authentication/Provider/UserAuthenticationProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,8 @@ public function supports(TokenInterface $token)
109109

110110
/**
111111
* Retrieves roles from user and appends SwitchUserRole if original token contained one.
112-
*
113-
* @return array The user roles
114112
*/
115-
private function getRoles(UserInterface $user, TokenInterface $token)
113+
private function getRoles(UserInterface $user, TokenInterface $token): array
116114
{
117115
$roles = $user->getRoles();
118116

Encoder/EncoderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getEncoder($user)
6565
*
6666
* @throws \InvalidArgumentException
6767
*/
68-
private function createEncoder(array $config)
68+
private function createEncoder(array $config): PasswordEncoderInterface
6969
{
7070
if (isset($config['algorithm'])) {
7171
$config = $this->getEncoderConfigFromAlgorithm($config);

User/InMemoryUserProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,9 @@ public function supportsClass($class)
9393
/**
9494
* Returns the user by given username.
9595
*
96-
* @return User
97-
*
9896
* @throws UsernameNotFoundException if user whose given username does not exist
9997
*/
100-
private function getUser(string $username)
98+
private function getUser(string $username): User
10199
{
102100
if (!isset($this->users[strtolower($username)])) {
103101
$ex = new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username));

0 commit comments

Comments
 (0)