Skip to content

Commit

Permalink
add return types for authenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
xini committed Jul 19, 2022
1 parent 34f6d78 commit 84e6b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GraphQL/ApiKeyAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class ApiKeyAuthenticator implements AuthenticatorInterface
{
public function authenticate(HTTPRequest $request)
public function authenticate(HTTPRequest $request): ?Member
{
$key = $this->getApiKeyHeader($request);
// This should not happen, unless ::authenticate is called without ::isApplicable
Expand All @@ -38,7 +38,7 @@ public function authenticate(HTTPRequest $request)
throw new ValidationException('Specified API key is not assigned to any members.');
}

public function isApplicable(HTTPRequest $request)
public function isApplicable(HTTPRequest $request): bool
{
return (bool) $this->getApiKeyHeader($request);
}
Expand Down

0 comments on commit 84e6b3b

Please sign in to comment.