Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51b3c2e

Browse filesBrowse files
[Security] [Guard] Added type-hints to AuthenticatorInterface
1 parent 393f9ae commit 51b3c2e
Copy full SHA for 51b3c2e

File tree

3 files changed

+4
-13
lines changed
Filter options

3 files changed

+4
-13
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ abstract class AbstractGuardAuthenticator implements AuthenticatorInterface
2525
* Shortcut to create a PostAuthenticationGuardToken for you, if you don't really
2626
* care about which authenticated token you're using.
2727
*
28-
* @param string $providerKey
29-
*
3028
* @return PostAuthenticationGuardToken
3129
*/
32-
public function createAuthenticatedToken(UserInterface $user, $providerKey)
30+
public function createAuthenticatedToken(UserInterface $user, string $providerKey)
3331
{
3432
return new PostAuthenticationGuardToken(
3533
$user,

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/AuthenticatorInterface.php
+2-9Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,9 @@ public function checkCredentials($credentials, UserInterface $user);
108108
*
109109
* @see AbstractGuardAuthenticator
110110
*
111-
* @param UserInterface $user
112-
* @param string $providerKey The provider (i.e. firewall) key
113-
*
114111
* @return GuardTokenInterface
115112
*/
116-
public function createAuthenticatedToken(UserInterface $user, $providerKey);
113+
public function createAuthenticatedToken(UserInterface $user, string $providerKey);
117114

118115
/**
119116
* Called when authentication executed, but failed (e.g. wrong username password).
@@ -140,13 +137,9 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
140137
* If you return null, the current request will continue, and the user
141138
* will be authenticated. This makes sense, for example, with an API.
142139
*
143-
* @param Request $request
144-
* @param TokenInterface $token
145-
* @param string $providerKey The provider (i.e. firewall) key
146-
*
147140
* @return Response|null
148141
*/
149-
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey);
142+
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey);
150143

151144
/**
152145
* Does this method support remember me cookies?

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.