getVerticesEdgeFrom(); if ($vertices->hasDuplicates()) { throw new UnexpectedValueException(); } return $vertices; } protected function getVerticesParent(Vertex $vertex) { $vertices = $vertex->getVerticesEdgeTo(); if ($vertices->hasDuplicates()) { throw new UnexpectedValueException(); } return $vertices; } }