NodeInfo::getId()   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 0
crap 1
1
<?php
2
3
namespace Phloppy;
4
5
class NodeInfo {
6
7
    /**
8
     * @var string
9
     */
10
    private $id;
11
12
    /**
13
     * @var string
14
     */
15
    private $server;
16
17
    /**
18
     * @var int
19
     */
20
    private $priority;
21
22 2
    public function __construct($id, $server, $priority)
23
    {
24 2
        $this->id       = $id;
25 2
        $this->server   = $server;
26 2
        $this->priority = $priority;
27 2
    }
28
29
    /**
30
     * @return string
31
     */
32 2
    public function getServer()
33
    {
34 2
        return $this->server;
35
    }
36
37
38
    /**
39
     * @return string
40
     */
41 1
    public function getId()
42
    {
43 1
        return $this->id;
44
    }
45
46
    /**
47
     * @return int
48
     */
49 1
    public function getPriority()
50
    {
51 1
        return $this->priority;
52
    }
53
}
54