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

NodeInfo   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 6
c 3
b 1
f 0
lcom 0
cbo 0
dl 0
loc 57
ccs 17
cts 17
cp 1
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getId() 0 4 1
A getParentId() 0 4 1
A getLevel() 0 4 1
A getLeft() 0 4 1
A getRight() 0 4 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