<?php

/**
 * @var int
 */
const TIDY_NODETYPE_ROOT = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_DOCTYPE = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_COMMENT = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_PROCINS = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_TEXT = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_START = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_END = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_STARTEND = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_CDATA = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_SECTION = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_ASP = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_JSTE = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_PHP = UNKNOWN;

/**
 * @var int
 */
const TIDY_NODETYPE_XMLDECL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_UNKNOWN = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_A = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ABBR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ACRONYM = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ADDRESS = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ALIGN = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_APPLET = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_AREA = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_B = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BASE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BASEFONT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BDO = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BGSOUND = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BIG = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BLINK = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BLOCKQUOTE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BODY = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BUTTON = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_CAPTION = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_CENTER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_CITE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_CODE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_COL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_COLGROUP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_COMMENT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DD = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DEL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DFN = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DIR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DIV = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_EM = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_EMBED = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FIELDSET = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FONT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FORM = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FRAME = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FRAMESET = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_H1 = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_H2 = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_H3 = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_H4 = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_H5 = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_H6 = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_HEAD = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_HR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_HTML = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_I = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_IFRAME = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ILAYER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_IMG = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_INPUT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_INS = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ISINDEX = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_KBD = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_KEYGEN = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_LABEL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_LAYER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_LEGEND = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_LI = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_LINK = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_LISTING = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MAP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MARQUEE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MENU = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_META = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MULTICOL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NOBR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NOEMBED = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NOFRAMES = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NOLAYER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NOSAVE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NOSCRIPT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_OBJECT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_OL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_OPTGROUP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_OPTION = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_P = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_PARAM = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_PLAINTEXT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_PRE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_Q = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_RB = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_RBC = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_RP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_RT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_RTC = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_RUBY = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_S = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SAMP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SCRIPT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SELECT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SERVER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SERVLET = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SMALL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SPACER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SPAN = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_STRIKE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_STRONG = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_STYLE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SUB = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SUP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TABLE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TBODY = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TD = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TEXTAREA = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TFOOT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TH = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_THEAD = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TITLE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_U = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_UL = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_VAR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_WBR = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_XMP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ARTICLE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_ASIDE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_AUDIO = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_BDI = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_CANVAS = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_COMMAND = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DATALIST = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DETAILS = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_DIALOG = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FIGCAPTION = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FIGURE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_FOOTER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_HEADER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_HGROUP = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MAIN = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MARK = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_MENUITEM = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_METER = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_NAV = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_OUTPUT = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_PROGRESS = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SECTION = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SOURCE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_SUMMARY = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TEMPLATE = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TIME = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_TRACK = UNKNOWN;

/**
 * @var int
 */
const TIDY_TAG_VIDEO = UNKNOWN;

function tidy_parse_string(string $string, array|string|null $config = null, null|string $encoding = null): tidy|false
{
}

function tidy_get_error_buffer(tidy $tidy): string|false
{
}

function tidy_get_output(tidy $tidy): string
{
}

function tidy_parse_file(
    string $filename,
    array|string|null $config = null,
    null|string $encoding = null,
    bool $useIncludePath = false,
): tidy|false {
}

function tidy_clean_repair(tidy $tidy): bool
{
}

function tidy_repair_string(
    string $string,
    array|string|null $config = null,
    null|string $encoding = null,
): string|false {
}

function tidy_repair_file(
    string $filename,
    array|string|null $config = null,
    null|string $encoding = null,
    bool $useIncludePath = false,
): string|false {
}

function tidy_diagnose(tidy $tidy): bool
{
}

function tidy_get_release(): string
{
}

function tidy_get_opt_doc(tidy $tidy, string $option): string|false
{
}

function tidy_get_config(tidy $tidy): array
{
}

function tidy_get_status(tidy $tidy): int
{
}

function tidy_get_html_ver(tidy $tidy): int
{
}

function tidy_is_xhtml(tidy $tidy): bool
{
}

function tidy_is_xml(tidy $tidy): bool
{
}

function tidy_error_count(tidy $tidy): int
{
}

function tidy_warning_count(tidy $tidy): int
{
}

function tidy_access_count(tidy $tidy): int
{
}

function tidy_config_count(tidy $tidy): int
{
}

function tidy_getopt(tidy $tidy, string $option): string|int|bool
{
}

function tidy_get_root(tidy $tidy): null|tidyNode
{
}

function tidy_get_html(tidy $tidy): null|tidyNode
{
}

function tidy_get_head(tidy $tidy): null|tidyNode
{
}

function tidy_get_body(tidy $tidy): null|tidyNode
{
}

class tidy
{
    public null|string $errorBuffer = null;
    public null|string $value = null;

    public function __construct(
        null|string $filename = null,
        array|string|null $config = null,
        null|string $encoding = null,
        bool $useIncludePath = false,
    ) {}

    public function getOpt(string $option): string|int|bool
    {
    }

    public function cleanRepair(): bool
    {
    }

    /** @tentative-return-type */
    public function parseFile(
        string $filename,
        array|string|null $config = null,
        null|string $encoding = null,
        bool $useIncludePath = false,
    ): bool {
    }

    /** @tentative-return-type */
    public function parseString(string $string, array|string|null $config = null, null|string $encoding = null): bool
    {
    }

    public static function repairString(
        string $string,
        array|string|null $config = null,
        null|string $encoding = null,
    ): string|false {
    }

    public static function repairFile(
        string $filename,
        array|string|null $config = null,
        null|string $encoding = null,
        bool $useIncludePath = false,
    ): string|false {
    }

    public function diagnose(): bool
    {
    }

    public function getRelease(): string
    {
    }

    public function getConfig(): array
    {
    }

    public function getStatus(): int
    {
    }

    public function getHtmlVer(): int
    {
    }

    public function getOptDoc(string $option): string|false
    {
    }

    public function isXhtml(): bool
    {
    }

    public function isXml(): bool
    {
    }

    public function root(): null|tidyNode
    {
    }

    public function head(): null|tidyNode
    {
    }

    public function html(): null|tidyNode
    {
    }

    public function body(): null|tidyNode
    {
    }
}

final class tidyNode
{
    public readonly string $value;
    public readonly string $name;
    public readonly int $type;
    public readonly int $line;
    public readonly int $column;
    public readonly bool $proprietary;
    public readonly null|int $id;
    public readonly null|array $attribute;
    public readonly null|array $child;

    private function __construct() {}

    public function hasChildren(): bool
    {
    }

    public function hasSiblings(): bool
    {
    }

    public function isComment(): bool
    {
    }

    public function isHtml(): bool
    {
    }

    public function isText(): bool
    {
    }

    public function isJste(): bool
    {
    }

    public function isAsp(): bool
    {
    }

    public function isPhp(): bool
    {
    }

    public function getParent(): null|tidyNode
    {
    }

    public function getPreviousSibling(): null|tidyNode
    {
    }

    public function getNextSibling(): null|tidyNode
    {
    }
}
