summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-26 08:08:10 +0100
committerGitHub <noreply@github.com>2019-11-26 08:08:10 +0100
commit0fab27f459d3276a2559cdee5693bfec8c2cf1c9 (patch)
tree1b9effb3d3184da4da347bbee89969f50c5f6876 /lib/private
parent123c4aa4e01583d9d3f8db6d46fc28f2a6fb76b8 (diff)
parent128a460d7bf3be01aa2d103c6b648d96e4d99a7b (diff)
downloadnextcloud-server-0fab27f459d3276a2559cdee5693bfec8c2cf1c9.tar.gz
nextcloud-server-0fab27f459d3276a2559cdee5693bfec8c2cf1c9.zip
Merge pull request #18108 from nextcloud/refactor/strict-credential-store
Add return type hint to credential store and make it strict
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Authentication/LoginCredentials/Store.php7
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();
}