Skip to content
Permalink
Browse files

refactor: Fixed `@param` annotation type and actual parameter type de…

…finition.
  • Loading branch information...
tarlepp committed Jun 23, 2019
1 parent 05ba239 commit 6a6c36309074036d037ac6889054b5dbcacc8756
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Security/Authenticator/ApiKeyAuthenticator.php
@@ -86,12 +86,12 @@ public function supports(Request $request): bool
*
* return new Response('Auth header required', 401);
*
* @param Request $request The request that resulted in an AuthenticationException
* @param AuthenticationException $authException The exception that started the authentication process
* @param Request $request The request that resulted in an AuthenticationException
* @param AuthenticationException|null $authException The exception that started the authentication process
*
* @return JsonResponse
*/
public function start(Request $request, AuthenticationException $authException = null): JsonResponse
public function start(Request $request, ?AuthenticationException $authException = null): JsonResponse
{
$data = [
'message' => 'Authentication Required',
@@ -231,7 +231,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): JsonResponse
{
$data = [
'message' => strtr($exception->getMessageKey(), $exception->getMessageData())
'message' => strtr($exception->getMessageKey(), $exception->getMessageData()),
];
return new JsonResponse($data, Response::HTTP_FORBIDDEN);

0 comments on commit 6a6c363

Please sign in to comment.
You can’t perform that action at this time.