| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | trait NodeTrait |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * @var NodeInterface|null $parentNode The node parent. |
||
| 29 | */ |
||
| 30 | protected $parentNode; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param NodeInterface|null $parentNode The new parent node to set. |
||
| 34 | */ |
||
| 35 | public function setParentNode(?NodeInterface $parentNode): void |
||
| 36 | { |
||
| 37 | $this->parentNode = $parentNode; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return NodeInterface|null The parent node if it exists. |
||
| 42 | */ |
||
| 43 | public function getParentNode(): ?NodeInterface |
||
| 46 | } |
||
| 47 | } |
||
| 48 |