private function ensureDocumentType($html)
    {
        $hasDocumentType = \stripos($html, '<!DOCTYPE') !== false;
        if ($hasDocumentType) {
            return $html;
        }

        return static::DEFAULT_DOCUMENT_TYPE . $html;
    }
private function ensureDocumentType($html)
    {
        $hasDocumentType = \stripos($html, '<!DOCTYPE') !== false;
        if ($hasDocumentType) {
            return $html;
        }

        return static::DEFAULT_DOCUMENT_TYPE . $html;
    }
private function ensureDocumentType ( $ html ) { $ hasDocumentType = \ stripos ( $ html , '<!DOCTYPE' ) !== false ; if ( $ hasDocumentType ) { return $ html ; } return static :: DEFAULT_DOCUMENT_TYPE . $ html ; }
Makes sure that the passed HTML has a document type.

@param string $html

@return string HTML with document type
Makes sure that the passed HTML has a document type .