Skip to content

Commit d02bbde

Browse files
[Security] [Guard] Added type-hints to AuthenticatorInterface
1 parent a25848b commit d02bbde

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class AbstractGuardAuthenticator implements AuthenticatorInterface
3030
*
3131
* @return PostAuthenticationGuardToken
3232
*/
33-
public function createAuthenticatedToken(UserInterface $user, $providerKey)
33+
public function createAuthenticatedToken(UserInterface $user, string $providerKey)
3434
{
3535
return new PostAuthenticationGuardToken(
3636
$user,

src/Symfony/Component/Security/Guard/AuthenticatorInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function checkCredentials($credentials, UserInterface $user);
117117
*
118118
* @return GuardTokenInterface
119119
*/
120-
public function createAuthenticatedToken(UserInterface $user, $providerKey);
120+
public function createAuthenticatedToken(UserInterface $user, string $providerKey);
121121

122122
/**
123123
* Called when authentication executed, but failed (e.g. wrong username password).
@@ -150,7 +150,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
150150
*
151151
* @return Response|null
152152
*/
153-
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey);
153+
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey);
154154

155155
/**
156156
* Does this method support remember me cookies?

src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function supports(Request $request)
103103
return true;
104104
}
105105

106-
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
106+
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey)
107107
{
108108
}
109109

0 commit comments

Comments
 (0)