| Conditions | 4 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | protected function getSystemMemoryInfo() |
||
| 51 | { |
||
| 52 | $meminfo = array(); |
||
| 53 | |||
| 54 | if (file_exists(static::MEMINFO_PATH)) { |
||
| 55 | $data = explode("\n", file_get_contents(static::MEMINFO_PATH)); |
||
| 56 | $meminfo = array(); |
||
| 57 | foreach ($data as $line) { |
||
| 58 | if (!empty($line)) { |
||
| 59 | list($key, $val) = explode(":", $line); |
||
| 60 | |||
| 61 | $meminfo[$key] = intval($val); |
||
| 62 | } |
||
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | return $meminfo; |
||
| 67 | } |
||
| 68 | |||
| 85 |