From 48e3864c779a6ac6a8222a5d7afbb91a1a84996d Mon Sep 17 00:00:00 2001 From: Clark Tomlinson Date: Tue, 31 Mar 2015 12:17:01 -0400 Subject: :100:% coverage for session class --- apps/encryption/lib/session.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/encryption/lib') 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 +} -- cgit v1.2.3