Total Complexity | 7 |
Total Lines | 77 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class Node implements NodeInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var PointInterface |
||
13 | */ |
||
14 | private $point; |
||
15 | |||
16 | /** |
||
17 | * @var NodeInterface|null |
||
18 | */ |
||
19 | private $left; |
||
20 | |||
21 | /** |
||
22 | * @var NodeInterface|null |
||
23 | */ |
||
24 | private $right; |
||
25 | |||
26 | /** |
||
27 | * @param PointInterface $point |
||
28 | */ |
||
29 | public function __construct(PointInterface $point) |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @inheritDoc |
||
36 | */ |
||
37 | public function getPoint(): PointInterface |
||
38 | { |
||
39 | return $this->point; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @inheritDoc |
||
44 | */ |
||
45 | public function setPoint(?PointInterface $point): NodeInterface |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @inheritDoc |
||
54 | */ |
||
55 | public function getLeft(): ?NodeInterface |
||
56 | { |
||
57 | return $this->left; |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @inheritDoc |
||
62 | */ |
||
63 | public function setLeft(?NodeInterface $node): NodeInterface |
||
64 | { |
||
65 | $this->left = $node; |
||
66 | |||
67 | return $this; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | public function getRight(): ?NodeInterface |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @inheritDoc |
||
80 | */ |
||
81 | public function setRight(?NodeInterface $node): NodeInterface |
||
86 | } |
||
87 | } |
||
88 |