mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 11:48:49 +02:00
Fixed PHPstan issues
This commit is contained in:
parent
6be55d1837
commit
f265b9d19d
5 changed files with 53 additions and 15 deletions
|
@ -118,12 +118,8 @@ class ApiTokenAuthenticator implements AuthenticatorInterface
|
|||
|
||||
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response
|
||||
{
|
||||
if (null !== $this->translator) {
|
||||
$errorMessage = $this->translator->trans($exception->getMessageKey(), $exception->getMessageData(),
|
||||
'security');
|
||||
} else {
|
||||
$errorMessage = strtr($exception->getMessageKey(), $exception->getMessageData());
|
||||
}
|
||||
$errorMessage = $this->translator->trans($exception->getMessageKey(), $exception->getMessageData(),
|
||||
'security');
|
||||
|
||||
return new Response(
|
||||
null,
|
||||
|
@ -152,8 +148,9 @@ class ApiTokenAuthenticator implements AuthenticatorInterface
|
|||
|
||||
return sprintf('Bearer %s', implode(',', $values));
|
||||
}
|
||||
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue