Completed
Push — master ( e2c5a9...852a9e )
by Petrică
02:20
created

MemoryTotalGauge::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Petrica
5
 * Date: 3/24/2016
6
 * Time: 1:17
7
 */
8
namespace Petrica\StatsdSystem\Gauge;
9
10
class MemoryTotalGauge extends AbstractMemoryGauge
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function getPath()
16
    {
17
        return 'memory.total.value';
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function getValue()
24
    {
25
        $info = $this->getSystemMemoryInfo();
26
27
        if (isset($info['MemTotal'])) {
28
            return $info['MemTotal'];
29
        }
30
31
        return false;
32
    }
33
}