DummyServer::getProcessCount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Innmind\ProvisionerBundle\Server;
4
5
/**
6
 * Helper used for tests purposes
7
 */
8
class DummyServer implements ServerInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 3
    public function getCpuUsage()
14
    {
15 3
        return 80;
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function getProcesses()
22
    {
23
        return [[
24
            'usage' => 42,
25
            'name' => 'phpunit'
26
        ]];
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 30
    public function getProcessUsage($processName)
33
    {
34 30
        return 24;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40 30
    public function getProcessCount($command)
41
    {
42 30
        return 10;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function getLoadAverage()
49
    {
50
        return [3, 2, 1];
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function getCurrentLoadAverage()
57
    {
58
        return 3;
59
    }
60
}
61