From 884f92b5a50fdb3fda00ccb168e54b4a516e5637 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 1 Mar 2017 21:08:18 +0000 Subject: [PATCH] return null explicitly for nullable return types --- app/Services/IndieAuthService.php | 2 +- app/Services/TokenService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/IndieAuthService.php b/app/Services/IndieAuthService.php index b300702a..29b3b65c 100644 --- a/app/Services/IndieAuthService.php +++ b/app/Services/IndieAuthService.php @@ -26,7 +26,7 @@ class IndieAuthService { $endpoint = $this->client->discoverAuthorizationEndpoint($this->client->normalizeMeURL($domain)); if ($endpoint === false) { - return; + return null; } return $endpoint; diff --git a/app/Services/TokenService.php b/app/Services/TokenService.php index 257bd84c..fd4cd1cb 100644 --- a/app/Services/TokenService.php +++ b/app/Services/TokenService.php @@ -45,7 +45,7 @@ class TokenService try { $token = (new Parser())->parse((string) $token); } catch (InvalidArgumentException | RuntimeException $e) { - return; + return null; } if ($token->verify($signer, config('app.key'))) { //signuture valid