src/PHPHtmlParser/Selector/Selector.php
protected function checkTag(array $rule, AbstractNode $node): bool
    {
        if ( ! empty($rule['tag']) && $rule['tag'] != $node->getTag()->name() &&
            $rule['tag'] != '*'
        ) {
            return false;
        }

        return true;
    }
protected function checkTag(array $rule, AbstractNode $node): bool
    {
        if ( ! empty($rule['tag']) && $rule['tag'] != $node->getTag()->name() &&
            $rule['tag'] != '*'
        ) {
            return false;
        }

        return true;
    }
protected function checkTag ( array $ rule , AbstractNode $ node ) : bool { if ( ! empty ( $ rule [ 'tag' ] ) && $ rule [ 'tag' ] != $ node -> getTag ( ) -> name ( ) && $ rule [ 'tag' ] != '*' ) { return false ; } return true ; }
Checks tag condition from rules against node.

@param array $rule
@param AbstractNode $node
@return bool
Checks tag condition from rules against node .