| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Node |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | protected $value; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var Node |
||
| 23 | */ |
||
| 24 | protected $left; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var Node |
||
| 28 | */ |
||
| 29 | protected $right; |
||
| 30 | |||
| 31 | public function __construct($value, $left = null, $right = null) |
||
| 32 | { |
||
| 33 | $this->value = $value; |
||
| 34 | $this->left = $left; |
||
| 35 | $this->right = $right; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return int |
||
| 40 | */ |
||
| 41 | public function getValue() |
||
| 42 | { |
||
| 43 | return $this->value; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return Node |
||
| 48 | */ |
||
| 49 | public function getLeft() |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return Node |
||
| 56 | */ |
||
| 57 | public function getRight() |
||
| 60 | } |
||
| 61 | } |