From 128a460d7bf3be01aa2d103c6b648d96e4d99a7b Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 25 Nov 2019 15:59:55 +0100 Subject: Add return type hint to credential store and make it strict Signed-off-by: Christoph Wurst --- lib/private/Authentication/LoginCredentials/Store.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/private') diff --git a/lib/private/Authentication/LoginCredentials/Store.php b/lib/private/Authentication/LoginCredentials/Store.php index 0ed19a2dd07..5f8be9b769f 100644 --- a/lib/private/Authentication/LoginCredentials/Store.php +++ b/lib/private/Authentication/LoginCredentials/Store.php @@ -1,4 +1,5 @@ - * @@ -82,8 +83,8 @@ class Store implements IStore { * @return ICredentials the login credentials of the current user * @throws CredentialsUnavailableException */ - public function getLoginCredentials() { - if (is_null($this->tokenProvider)) { + public function getLoginCredentials(): ICredentials { + if ($this->tokenProvider === null) { throw new CredentialsUnavailableException(); } -- cgit v1.2.3