diff --git a/lib/private/Authentication/LoginCredentials/Store.php b/lib/private/Authentication/LoginCredentials/Store.php index 0ed19a2dd0..5f8be9b769 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(); } diff --git a/lib/public/Authentication/LoginCredentials/IStore.php b/lib/public/Authentication/LoginCredentials/IStore.php index 5306eb6d6e..054e6d8564 100644 --- a/lib/public/Authentication/LoginCredentials/IStore.php +++ b/lib/public/Authentication/LoginCredentials/IStore.php @@ -1,4 +1,5 @@ - * @@ -29,7 +30,7 @@ use OCP\Authentication\Exceptions\CredentialsUnavailableException; * @since 12 */ interface IStore { - + /** * Get login credentials of the currently logged in user * @@ -38,6 +39,6 @@ interface IStore { * @throws CredentialsUnavailableException * @return ICredentials the login credentials of the current user */ - public function getLoginCredentials(); - + public function getLoginCredentials(): ICredentials; + }