DummyServer   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 46.15%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 53
ccs 6
cts 13
cp 0.4615
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getCpuUsage() 0 4 1
A getProcesses() 0 7 1
A getProcessUsage() 0 4 1
A getProcessCount() 0 4 1
A getLoadAverage() 0 4 1
A getCurrentLoadAverage() 0 4 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