public function attach(Point $point) { if ($point instanceof self) { throw new LogicException('cannot attach a cluster to another'); } $this->points->attach($point); return $point; }