Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
[Security] [Guard] Removed useless param annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbisignani committed Jun 30, 2019
1 parent 24a4e2d commit 61eea20
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 37 deletions.
3 changes: 1 addition & 2 deletions Guard/AbstractGuardAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public function supports(Request $request)
* Shortcut to create a PostAuthenticationGuardToken for you, if you don't really
* care about which authenticated token you're using.
*
* @param UserInterface $user
* @param string $providerKey
* @param string $providerKey
*
* @return PostAuthenticationGuardToken
*/
Expand Down
4 changes: 1 addition & 3 deletions Guard/Authenticator/AbstractFormLoginAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
/**
* Override to change what happens after successful authentication.
*
* @param Request $request
* @param TokenInterface $token
* @param string $providerKey
* @param string $providerKey
*
* @return RedirectResponse
*/
Expand Down
4 changes: 0 additions & 4 deletions Guard/AuthenticatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ interface AuthenticatorInterface extends GuardAuthenticatorInterface
*
* If this returns false, the authenticator will be skipped.
*
* @param Request $request
*
* @return bool
*/
public function supports(Request $request);
Expand All @@ -53,8 +51,6 @@ public function supports(Request $request);
*
* return ['api_key' => $request->headers->get('X-API-TOKEN')];
*
* @param Request $request
*
* @return mixed Any non-null value
*
* @throws \UnexpectedValueException If null is returned
Expand Down
15 changes: 3 additions & 12 deletions Guard/GuardAuthenticatorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ public function authenticateWithToken(TokenInterface $token, Request $request/*,
/**
* Returns the "on success" response for the given GuardAuthenticator.
*
* @param TokenInterface $token
* @param Request $request
* @param AuthenticatorInterface $guardAuthenticator
* @param string $providerKey The provider (i.e. firewall) key
* @param string $providerKey The provider (i.e. firewall) key
*
* @return Response|null
*/
Expand All @@ -93,10 +90,7 @@ public function handleAuthenticationSuccess(TokenInterface $token, Request $requ
* Convenience method for authenticating the user and returning the
* Response *if any* for success.
*
* @param UserInterface $user
* @param Request $request
* @param AuthenticatorInterface $authenticator
* @param string $providerKey The provider (i.e. firewall) key
* @param string $providerKey The provider (i.e. firewall) key
*
* @return Response|null
*/
Expand All @@ -115,10 +109,7 @@ public function authenticateUserAndHandleSuccess(UserInterface $user, Request $r
* Handles an authentication failure and returns the Response for the
* GuardAuthenticator.
*
* @param AuthenticationException $authenticationException
* @param Request $request
* @param AuthenticatorInterface $guardAuthenticator
* @param string $providerKey The key of the firewall
* @param string $providerKey The provider (i.e. firewall) key
*
* @return Response|null
*/
Expand Down
18 changes: 2 additions & 16 deletions Guard/GuardAuthenticatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface
*
* return ['api_key' => $request->headers->get('X-API-TOKEN')];
*
* @param Request $request
*
* @return mixed|null
*/
public function getCredentials(Request $request);
Expand All @@ -69,9 +67,6 @@ public function getCredentials(Request $request);
* You may throw an AuthenticationException if you wish. If you return
* null, then a UsernameNotFoundException is thrown for you.
*
* @param mixed $credentials
* @param UserProviderInterface $userProvider
*
* @throws AuthenticationException
*
* @return UserInterface|null
Expand All @@ -87,9 +82,6 @@ public function getUser($credentials, UserProviderInterface $userProvider);
*
* The *credentials* are the return value from getCredentials()
*
* @param mixed $credentials
* @param UserInterface $user
*
* @return bool
*
* @throws AuthenticationException
Expand All @@ -105,8 +97,7 @@ public function checkCredentials($credentials, UserInterface $user);
*
* @see AbstractGuardAuthenticator
*
* @param UserInterface $user
* @param string $providerKey The provider (i.e. firewall) key
* @param string $providerKey The provider (i.e. firewall) key
*
* @return GuardTokenInterface
*/
Expand All @@ -121,9 +112,6 @@ public function createAuthenticatedToken(UserInterface $user, $providerKey);
* If you return null, the request will continue, but the user will
* not be authenticated. This is probably not what you want to do.
*
* @param Request $request
* @param AuthenticationException $exception
*
* @return Response|null
*/
public function onAuthenticationFailure(Request $request, AuthenticationException $exception);
Expand All @@ -137,9 +125,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
* If you return null, the current request will continue, and the user
* will be authenticated. This makes sense, for example, with an API.
*
* @param Request $request
* @param TokenInterface $token
* @param string $providerKey The provider (i.e. firewall) key
* @param string $providerKey The provider (i.e. firewall) key
*
* @return Response|null
*/
Expand Down

0 comments on commit 61eea20

Please sign in to comment.