Completed
Push — develop ( 4ea5a3...a8c617 )
by Bartko
05:56
created

NodeInfo::getLevel()   A

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 2
Bugs 1 Features 0
Metric Value
c 2
b 1
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
namespace StefanoTree\NestedSet;
3
4
class NodeInfo
5
{
6
    private $id;
7
    private $parentId;
8
    private $level;
9
    private $left;
10
    private $right;
11
12 43
    public function __construct($id, $parentId, $level, $left, $right)
13
    {
14 43
        $this->id       = $id;
15 43
        $this->parentId = $parentId;
16 43
        $this->level    = $level;
17 43
        $this->left     = $left;
18 43
        $this->right    = $right;
19 43
    }
20
21
    /**
22
     * @return int|null
23
     */
24 25
    public function getId()
25
    {
26 25
        return $this->id;
27
    }
28
29
    /**
30
     * @return int|null
31
     */
32 28
    public function getParentId()
33
    {
34 28
        return $this->parentId;
35
    }
36
37
    /**
38
     * @return int|null
39
     */
40 37
    public function getLevel()
41
    {
42 37
        return $this->level;
43
    }
44
45
    /**
46
     * @return int|null
47
     */
48 43
    public function getLeft()
49
    {
50 43
        return $this->left;
51
    }
52
53
    /**
54
     * @return int|null
55
     */
56 43
    public function getRight()
57
    {
58 43
        return $this->right;
59
    }
60
}
61