Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
4 / 4
CRAP
100.00% covered (success)
100.00%
26 / 26
AfterFrameset
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
4 / 4
7
100.00% covered (success)
100.00%
26 / 26
 characters
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 startTag
100.00% covered (success)
100.00%
1 / 1
3
100.00% covered (success)
100.00%
14 / 14
 endTag
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
8 / 8
 endDocument
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
<?php
namespace RemexHtml\TreeBuilder;
use RemexHtml\Tokenizer\Attributes;
/**
 * The "after frameset" insertion mode
 */
class AfterFrameset extends InsertionMode {
    public function characters( $text, $start, $length, $sourceStart, $sourceLength ) {
        $this->handleFramesetWhitespace( false, $text, $start, $length, $sourceStart, $sourceLength );
    }
    public function startTag( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength ) {
        $builder = $this->builder;
        $dispatcher = $this->dispatcher;
        switch ( $name ) {
        case 'html':
            $dispatcher->inBody->startTag(
                $name, $attrs, $selfClose, $sourceStart, $sourceLength );
            break;
        case 'noframes':
            $dispatcher->inHead->startTag(
                $name, $attrs, $selfClose, $sourceStart, $sourceLength );
            break;
        default:
            $builder->error( "unexpected start tag after frameset, ignoring", $sourceStart );
            return;
        }
    }
    public function endTag( $name, $sourceStart, $sourceLength ) {
        $builder = $this->builder;
        $dispatcher = $this->dispatcher;
        switch ( $name ) {
        case 'html':
            $dispatcher->switchMode( Dispatcher::AFTER_AFTER_FRAMESET );
            break;
        default:
            $builder->error( "unexpected end tag after frameset, ignoring", $sourceStart );
        }
    }
    public function endDocument( $pos ) {
        $this->builder->stopParsing( $pos );
    }
}