Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | trait NodeTrait |
||
17 | { |
||
18 | /** |
||
19 | * @var NodeInterface|null $parentNode The node parent. |
||
20 | */ |
||
21 | protected $parentNode; |
||
22 | |||
23 | /** |
||
24 | * @param NodeInterface|null $parentNode The new parent node to set. |
||
25 | */ |
||
26 | public function setParentNode(?NodeInterface $parentNode): void |
||
27 | { |
||
28 | $this->parentNode = $parentNode; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return NodeInterface|null The parent node if it exists. |
||
33 | */ |
||
34 | public function getParentNode(): ?NodeInterface |
||
37 | } |
||
38 | } |
||
39 |