src/PHPHtmlParser/Selector/Selector.php
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;
    }
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;
    }
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 ; }
Returns the next child or null if no more children.

@param AbstractNode $node
@param AbstractNode $currentChild
@return AbstractNode|null
Returns the next child or null if no more children .