@@ -34,8 +34,9 @@ discard block |
||
| 34 | 34 | private function readLoadAvg() |
| 35 | 35 | { |
| 36 | 36 | $f = fopen($this->procDir . "/loadavg", "r"); |
| 37 | - if ( !$f ) |
|
| 38 | - throw new Exception("failed to read loadavg"); |
|
| 37 | + if ( !$f ) { |
|
| 38 | + throw new Exception("failed to read loadavg"); |
|
| 39 | + } |
|
| 39 | 40 | if ( ($str = fgets($f)) != FALSE ) |
| 40 | 41 | { |
| 41 | 42 | $this->loadavgData = explode(" ", $str); |
@@ -55,8 +56,9 @@ discard block |
||
| 55 | 56 | { |
| 56 | 57 | $f = fopen($this->procDir . "/meminfo", "r"); |
| 57 | 58 | $this->meminfoData = []; |
| 58 | - if ( !$f ) |
|
| 59 | - throw new Exception("failed to read meminfo"); |
|
| 59 | + if ( !$f ) { |
|
| 60 | + throw new Exception("failed to read meminfo"); |
|
| 61 | + } |
|
| 60 | 62 | while ( ($str = fgets($f)) != FALSE ) |
| 61 | 63 | { |
| 62 | 64 | $numMatches = preg_match_all( |