public function getFirstDescendantNode(...$classNames) {
        foreach ($this->getDescendantNodes() as $descendant) {
            foreach ($classNames as $className) {
                if ($descendant instanceof $className) {
                    return $descendant;
                }
            }
        }
        return null;
    }
public function getFirstDescendantNode(...$classNames) {
        foreach ($this->getDescendantNodes() as $descendant) {
            foreach ($classNames as $className) {
                if ($descendant instanceof $className) {
                    return $descendant;
                }
            }
        }
        return null;
    }
public function getFirstDescendantNode ( ... $ classNames ) { foreach ( $ this -> getDescendantNodes ( ) as $ descendant ) { foreach ( $ classNames as $ className ) { if ( $ descendant instanceof $ className ) { return $ descendant ; } } } return null ; }
Gets first descendant node that is an instance of one of the provided classes.
Returns null if there is no match.

@param array ...$classNames
@return Node|null
Gets first descendant node that is an instance of one of the provided classes . Returns null if there is no match .