Conditions | 4 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 1 | public function getCollection() |
|
28 | { |
||
29 | 1 | $collection = new ValuesCollection(); |
|
30 | |||
31 | 1 | $info = $this->getSystemMemoryInfo(); |
|
32 | |||
33 | 1 | if (!empty($info) && |
|
34 | 1 | isset($info['MemTotal']) && |
|
35 | 1 | isset($info['MemFree'])) { |
|
36 | |||
37 | 1 | $collection->add('total.value', $info['MemTotal']); |
|
38 | 1 | $collection->add('free.value', $info['MemFree']); |
|
39 | 1 | $collection->add('used.value', $this->getUsedMemory($info)); |
|
40 | 1 | } |
|
41 | |||
42 | 1 | return $collection; |
|
43 | } |
||
44 | |||
85 |