diff --git a/src/GraphQL/ApiKeyAuthenticator.php b/src/GraphQL/ApiKeyAuthenticator.php index 1ae4e30..fb706e5 100644 --- a/src/GraphQL/ApiKeyAuthenticator.php +++ b/src/GraphQL/ApiKeyAuthenticator.php @@ -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 @@ -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); }