protected function getNextChild(AbstractNode $node, AbstractNode $currentChild)
    {
        try {
            // get next child
            $child = $node->nextChild($currentChild->id());
        } catch (ChildNotFoundException $e) {
            // no more children
            $child = null;
        }

        return $child;
    }