| Total Complexity | 12 |
| Total Lines | 108 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class NodeInfo |
||
| 8 | { |
||
| 9 | private $id; |
||
| 10 | private $parentId; |
||
| 11 | private $level; |
||
| 12 | private $left; |
||
| 13 | private $right; |
||
| 14 | private $scope; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param null|int|string $id |
||
| 18 | * @param null|int|string $parentId |
||
| 19 | * @param int $level |
||
| 20 | * @param int $left |
||
| 21 | * @param int $right |
||
| 22 | * @param null|int|string $scope If scope is not used |
||
| 23 | */ |
||
| 24 | 73 | public function __construct($id, $parentId, int $level, int $left, int $right, $scope) |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return null|int|string |
||
| 36 | */ |
||
| 37 | 20 | public function getId() |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return null|int|string |
||
| 44 | */ |
||
| 45 | 37 | public function getParentId() |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param int $level |
||
| 52 | */ |
||
| 53 | 3 | public function setLevel($level): void |
|
| 54 | { |
||
| 55 | 3 | $this->level = $level; |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return int |
||
| 60 | */ |
||
| 61 | 42 | public function getLevel(): int |
|
| 62 | { |
||
| 63 | 42 | return $this->level; |
|
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param int $left |
||
| 68 | */ |
||
| 69 | 3 | public function setLeft($left): void |
|
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | 60 | public function getLeft(): int |
|
| 78 | { |
||
| 79 | 60 | return $this->left; |
|
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param int $right |
||
| 84 | */ |
||
| 85 | 3 | public function setRight($right): void |
|
| 88 | } |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return int |
||
| 92 | */ |
||
| 93 | 57 | public function getRight(): int |
|
| 94 | { |
||
| 95 | 57 | return $this->right; |
|
| 96 | } |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @return null|int|string |
||
| 100 | */ |
||
| 101 | 31 | public function getScope() |
|
| 102 | { |
||
| 103 | 31 | return $this->scope; |
|
| 104 | } |
||
| 105 | |||
| 106 | /** |
||
| 107 | * @return bool |
||
| 108 | */ |
||
| 109 | 18 | public function isRoot(): bool |
|
| 115 | } |
||
| 116 | } |
||
| 117 | } |
||
| 118 |