Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 7645591

Browse files
Merge pull request #181 from CESNET/melanger-patch-1
refactor: do not assign in if statement
2 parents 12759e7 + 661f8ff commit 7645591

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/NagiosStatusConnector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public function getStatus()
6363
{
6464
$result = [];
6565

66-
if (! ($key = file_get_contents($this->keyPath))) {
66+
$key = file_get_contents($this->keyPath);
67+
if (! $key) {
6768
throw new Exception('Cannot load ket from path: \'' . $this->keyPath . '\' !');
6869
}
6970

0 commit comments

Comments
 (0)