Skip to content

Commit

Permalink
Merge pull request #19 from xini/fix-return-types
Browse files Browse the repository at this point in the history
add return types for authenticator
  • Loading branch information
blueo authored Jul 19, 2022
2 parents 34f6d78 + 84e6b3b commit 4f3418e
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 4f3418e

Please sign in to comment.