Process::setPid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
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