diff options
author | Clark Tomlinson <fallen013@gmail.com> | 2015-03-31 12:17:01 -0400 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:29 +0200 |
commit | 48e3864c779a6ac6a8222a5d7afbb91a1a84996d (patch) | |
tree | 204c0f93b67f5bc64a91ab263f6cd4edc9944c52 /apps/encryption/lib | |
parent | 1358d07d3516ffb6ecedc451bd1a0ad60d3cb673 (diff) | |
download | nextcloud-server-48e3864c779a6ac6a8222a5d7afbb91a1a84996d.tar.gz nextcloud-server-48e3864c779a6ac6a8222a5d7afbb91a1a84996d.zip |
:100:% coverage for session class
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r-- | apps/encryption/lib/session.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/encryption/lib/session.php b/apps/encryption/lib/session.php index 8da11e522ce..785991ec2e0 100644 --- a/apps/encryption/lib/session.php +++ b/apps/encryption/lib/session.php @@ -54,7 +54,7 @@ class Session { */ public function getStatus() { $status = $this->session->get('encryptionInitialized'); - if (is_null($status)) { + if (!$status) { $status = self::NOT_INITIALIZED; } @@ -69,7 +69,8 @@ class Session { */ public function getPrivateKey() { $key = $this->session->get('privateKey'); - if (is_null($key)) { + + if (!$key) { throw new Exceptions\PrivateKeyMissingException('no private key stored in session'); } return $key; @@ -82,7 +83,7 @@ class Session { */ public function isPrivateKeySet() { $key = $this->session->get('privateKey'); - if (is_null($key)) { + if (!$key) { return false; } @@ -111,4 +112,4 @@ class Session { } -}
\ No newline at end of file +} |