Completed
Push — master ( c091a3...52a46f )
by Petrică
02:24
created

MemoryFreeGauge::getValue()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 10
ccs 0
cts 8
cp 0
rs 9.4285
cc 2
eloc 5
nc 2
nop 0
crap 6
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 MemoryFreeGauge extends AbstractMemoryGauge
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function getValue()
16
    {
17
        $info = $this->getSystemMemoryInfo();
18
19
        if (isset($info['MemFree'])) {
20
            return $info['MemFree'];
21
        }
22
23
        return false;
24
    }
25
}
26