| Total Complexity | 7 |
| Total Lines | 77 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class Node implements NodeInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var PointInterface |
||
| 18 | */ |
||
| 19 | private $point; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var NodeInterface|null |
||
| 23 | */ |
||
| 24 | private $left; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var NodeInterface|null |
||
| 28 | */ |
||
| 29 | private $right; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param PointInterface $point |
||
| 33 | */ |
||
| 34 | public function __construct(PointInterface $point) |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @inheritDoc |
||
| 41 | */ |
||
| 42 | public function getPoint(): PointInterface |
||
| 43 | { |
||
| 44 | return $this->point; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @inheritDoc |
||
| 49 | */ |
||
| 50 | public function setPoint(PointInterface $point): NodeInterface |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @inheritDoc |
||
| 59 | */ |
||
| 60 | public function getLeft(): ?NodeInterface |
||
| 61 | { |
||
| 62 | return $this->left; |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @inheritDoc |
||
| 67 | */ |
||
| 68 | public function setLeft(?NodeInterface $node): NodeInterface |
||
| 69 | { |
||
| 70 | $this->left = $node; |
||
| 71 | |||
| 72 | return $this; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @inheritDoc |
||
| 77 | */ |
||
| 78 | public function getRight(): ?NodeInterface |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @inheritDoc |
||
| 85 | */ |
||
| 86 | public function setRight(?NodeInterface $node): NodeInterface |
||
| 91 | } |
||
| 92 | } |
||
| 93 |