Skip to content

Commit f445329

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

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ abstract class AbstractGuardAuthenticator implements AuthenticatorInterface
2626
* care about which authenticated token you're using.
2727
*
2828
* @param UserInterface $user
29-
* @param string $providerKey
3029
*
3130
* @return PostAuthenticationGuardToken
3231
*/
33-
public function createAuthenticatedToken(UserInterface $user, $providerKey)
32+
public function createAuthenticatedToken(UserInterface $user, string $providerKey)
3433
{
3534
return new PostAuthenticationGuardToken(
3635
$user,

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,10 @@ public function checkCredentials($credentials, UserInterface $user);
113113
* @see AbstractGuardAuthenticator
114114
*
115115
* @param UserInterface $user
116-
* @param string $providerKey The provider (i.e. firewall) key
117116
*
118117
* @return GuardTokenInterface
119118
*/
120-
public function createAuthenticatedToken(UserInterface $user, $providerKey);
119+
public function createAuthenticatedToken(UserInterface $user, string $providerKey);
121120

122121
/**
123122
* Called when authentication executed, but failed (e.g. wrong username password).
@@ -146,11 +145,10 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
146145
*
147146
* @param Request $request
148147
* @param TokenInterface $token
149-
* @param string $providerKey The provider (i.e. firewall) key
150148
*
151149
* @return Response|null
152150
*/
153-
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey);
151+
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey);
154152

155153
/**
156154
* 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)