| 1 | <?php |
||
| 9 | class BinaryNode implements Node |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var self|null |
||
| 13 | */ |
||
| 14 | private $parent; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var self|null |
||
| 18 | */ |
||
| 19 | private $left; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var self|null |
||
| 23 | */ |
||
| 24 | private $right; |
||
| 25 | |||
| 26 | public function parent(): ?self |
||
| 30 | |||
| 31 | public function left(): ?self |
||
| 35 | |||
| 36 | public function right(): ?self |
||
| 40 | |||
| 41 | public function height(): int |
||
| 45 | |||
| 46 | public function balance(): int |
||
| 50 | |||
| 51 | public function setParent(?self $node = null): void |
||
| 55 | |||
| 56 | public function attachLeft(self $node): void |
||
| 61 | |||
| 62 | public function detachLeft(): void |
||
| 69 | |||
| 70 | public function attachRight(self $node): void |
||
| 75 | |||
| 76 | public function detachRight(): void |
||
| 83 | } |
||
| 84 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..