Process   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 82
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 46.15%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 9
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 82
ccs 12
cts 26
cp 0.4615
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getPid() 0 4 1
A setPid() 0 4 1
A getName() 0 4 1
A setName() 0 4 1
A getCpu() 0 4 1
A setCpu() 0 4 1
A getMemory() 0 4 1
A setMemory() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Petrica
5
 * Date: 5/29/2016
6
 * Time: 13:21
7
 */
8
namespace Petrica\StatsdSystem\Model\Process;
9
10
class Process
11
{
12
    private $pid;
13
14
    private $name;
15
16
    private $cpu;
17
18
    private $memory;
19
20 1
    public function __construct($name, $pid, $cpu, $memory)
21
    {
22 1
        $this->name = $name;
23 1
        $this->pid = $pid;
24 1
        $this->cpu = $cpu;
25 1
        $this->memory = $memory;
26 1
    }
27
28
    /**
29
     * @return mixed
30
     */
31
    public function getPid()
32
    {
33
        return $this->pid;
34
    }
35
36
    /**
37
     * @param mixed $pid
38
     */
39
    public function setPid($pid)
40
    {
41
        $this->pid = $pid;
42
    }
43
44
    /**
45
     * @return mixed
46
     */
47 1
    public function getName()
48
    {
49 1
        return $this->name;
50
    }
51
52
    /**
53
     * @param mixed $name
54
     */
55
    public function setName($name)
56
    {
57
        $this->name = $name;
58
    }
59
60
    /**
61
     * @return mixed
62
     */
63 1
    public function getCpu()
64
    {
65 1
        return $this->cpu;
66
    }
67
68
    /**
69
     * @param mixed $cpu
70
     */
71
    public function setCpu($cpu)
72
    {
73
        $this->cpu = $cpu;
74
    }
75
76
    /**
77
     * @return mixed
78
     */
79 1
    public function getMemory()
80
    {
81 1
        return $this->memory;
82
    }
83
84
    /**
85
     * @param mixed $memory
86
     */
87
    public function setMemory($memory)
88
    {
89
        $this->memory = $memory;
90
    }
91
}
92