diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-11-25 15:59:55 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-11-25 15:59:55 +0100 |
commit | 128a460d7bf3be01aa2d103c6b648d96e4d99a7b (patch) | |
tree | 2b3924d6216732dea8f85037a2b4e5c980726d95 /lib/private/Authentication | |
parent | 279c0cb2ed99c3914f19468c267344aa3a2f04e6 (diff) | |
download | nextcloud-server-128a460d7bf3be01aa2d103c6b648d96e4d99a7b.tar.gz nextcloud-server-128a460d7bf3be01aa2d103c6b648d96e4d99a7b.zip |
Add return type hint to credential store and make it strict
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/LoginCredentials/Store.php | 7 |
1 files changed, 4 insertions, 3 deletions
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 @@ -<?php +<?php declare(strict_types=1); + /** * @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -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(); } |