for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace KDTree\Structure;
use KDTree\{Interfaces\NodeInterface, Interfaces\PointInterface};
/**
* Class Node
*
* @package KDTree\Structure
*/
final class Node implements NodeInterface
{
* @var PointInterface
private $point;
* @var NodeInterface|null
private $left;
private $right;
* @param PointInterface $point
public function __construct(PointInterface $point)
$this->point = $point;
}
* @inheritDoc
public function getPoint(): PointInterface
return $this->point;
public function setPoint(PointInterface $point): NodeInterface
return $this;
public function getLeft(): ?NodeInterface
return $this->left;
public function setLeft(?NodeInterface $node): NodeInterface
$this->left = $node;
public function getRight(): ?NodeInterface
return $this->right;
public function setRight(?NodeInterface $node): NodeInterface
$this->right = $node;