<?php

declare(strict_types=1);

$httpReturnType = 'array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int, message: string}, cookies: array<int, \WP_Http_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';

if (file_exists(sprintf('%s/source/wordpress/wp-includes/Requests/Cookie/Jar.php', __DIR__))) {
    $httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_Http_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';
}
$cronArgsType = 'list<mixed>';
$wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}';
$wpWidgetRssFormInputsType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}';
$filesystemDirlistReturnType = "false|array<string, array{name: string, perms: string, permsn: string, owner: string|false, size: int|string|false, lastmodunix: int|string|false, lastmod: string|false, time: string|false, type: 'f'|'d'|'l', group: string|false, number: int|string|false, files?: array|false}>";

/**
 * This array follows a format similar to PHPStan’s function map:
 *
 * '<function_name>' => ['<return_type>', '<arg_name>' => '<arg_type>']
 *
 * For classes, or if you don't wish to define the `@phpstan-return` tag:
 * '<class_name>' => [null, '<arg_name>' => '<arg_type>']
 *
 * For class methods:
 * '<class_name::method_name>' => ['<return_type>', '<arg_name>' => '<arg_type>']
 *
 * For class properties:
 * '<class_name::$property_name>' => [null, '@phpstan-var' => '<property_type>']
 *
 * To add PHPStan tags, include them in the function/class/method/property entry
 * as additional key–value pairs, for example:
 * - '@phpstan-template <TemplateName>' => 'of <type_constraint>'
 * - '@phpstan-implements <InterfaceName<TemplateTypes>>' => ''
 * - '@phpstan-extends <ClassName<TemplateTypes>>' => ''
 * - '@phpstan-type <TypeName> = <type_definition>' => ''
 * - '@phpstan-property-read <property_type> $<property_name>' => ''
 * - '@phpstan-assert-if-true =<type> $<var_name>' => ''
 * - '@phpstan-[im]pure' => ''  // for [im]pure functions
 * Always prefix these keys with `@phpstan-`, and ensure the keys are unique to
 * avoid overwriting entries.
 *
 * @link https://github.com/phpstan/phpstan-src/blob/2.1.x/resources/functionMap.php
 */
return [
    // Functions
    '__return_empty_array' => ['array{}'],
    '__return_empty_string' => ["''"],
    '__return_zero' => ['0'],
    '_get_list_table' => ["(\$class_name is 'WP_Posts_List_Table'|'WP_Media_List_Table'|'WP_Terms_List_Table'|'WP_Users_List_Table'|'WP_Comments_List_Table'|'WP_Post_Comments_List_Table'|'WP_Links_List_Table'|'WP_Plugin_Install_List_Table'|'WP_Themes_List_Table'|'WP_Theme_Install_List_Table'|'WP_Plugins_List_Table'|'WP_Application_Passwords_List_Table'|'WP_MS_Sites_List_Table'|'WP_MS_Users_List_Table'|'WP_MS_Themes_List_Table'|'WP_Privacy_Data_Export_Requests_List_Table'|'WP_Privacy_Data_Removal_Requests_List_Table' ? new<T> : false)", '@phpstan-template T' => 'of string', 'class_name' => 'T', 'args' => 'array{screen?: string}'],
    'absint' => ['($maybeint is T&int<0, max> ? T : ($maybeint is int<min, -1> ? int<1, max> : ($maybeint is empty ? 0 : ($maybeint is numeric-string ? int<0, max> : ($maybeint is string ? 0 : ($maybeint is true|non-empty-array ? 1 : ($maybeint is bool ? 0|1 : int<0, max>)))))))', '@phpstan-template T' => 'of int', 'maybeint' => 'T|scalar|array|resource|null', '@phpstan-pure' => ''],
    'add_comments_page' => [null, 'callback' => "''|callable"],
    'add_dashboard_page' => [null, 'callback' => "''|callable"],
    'add_feed' => ['non-falsy-string', 'callback' => 'callable(bool, string): void'],
    'add_link' => ['int<0, max>'],
    'add_links_page' => [null, 'callback' => "''|callable"],
    'add_management_page' => [null, 'callback' => "''|callable"],
    'add_media_page' => [null, 'callback' => "''|callable"],
    'add_menu_page' => [null, 'callback' => "''|callable"],
    'add_options_page' => [null, 'callback' => "''|callable"],
    'add_pages_page' => [null, 'callback' => "''|callable"],
    'add_plugins_page' => [null, 'callback' => "''|callable"],
    'add_posts_page' => [null, 'callback' => "''|callable"],
    'add_shortcode' => ['void', 'tag' => 'non-empty-string', 'callback' => 'callable(array<string>, string|null, string): string'],
    'add_submenu_page' => [null, 'callback' => "''|callable"],
    'add_theme_page' => [null, 'callback' => "''|callable"],
    'add_users_page' => [null, 'callback' => "''|callable"],
    'addslashes_gpc' => ['($gpc is string ? string : array)', '@phpstan-pure' => ''],
    'antispambot' => [null, 'hex_encoding' => '0|1'],
    'apply_filters' => [null, 'hook_name' => 'non-empty-string'],
    'apply_filters_ref_array' => [null, 'hook_name' => 'non-empty-string'],
    'apply_filters_deprecated' => [null, 'hook_name' => 'non-empty-string'],
    'backslashit' => [null, '@phpstan-pure' => ''],
    'block_version' => ["(\$content is '' ? 0 : 0|1)", '@phpstan-pure' => ''],
    'bool_from_yn' => ["(\$yn is 'y' ? true : false)", '@phpstan-pure' => ''],
    'build_dropdown_script_block_core_categories' => ['non-falsy-string'],
    'check_admin_referer' => ['1|2|false', 'action' => 'string'],
    'check_ajax_referer' => ['1|2|false', 'action' => 'string'],
    'comment_class' => ['($display is true ? void : string)'],
    'current_action' => ['non-empty-string|false'],
    'current_filter' => ['non-empty-string|false'],
    'current_time' => ["(\$type is 'timestamp'|'U' ? int : string)"],
    'did_action' => ['int<0, max>'],
    'did_filter' => ['int<0, max>'],
    'do_action' => ['void', 'hook_name' => 'non-empty-string'],
    'do_action_ref_array' => ['void', 'hook_name' => 'non-empty-string'],
    'do_action_deprecated' => ['void', 'hook_name' => 'non-empty-string'],
    'do_meta_boxes' => ['int<0, max>'],
    'edit_link' => ['int<0, max>'],
    'edit_term_link' => ['($display is true ? void : string|void)'],
    'get_approved_comments' => ["(\$args is array{count: true}&array ? int : (\$args is array{fields: 'ids'}&array ? array<int, int> : array<int, \WP_Comment>))"],
    'get_attachment_taxonomies' => ["(\$output is 'names' ? array<int, string> : array<string, \WP_Taxonomy>)"],
    'get_available_post_statuses' => ['list<string>'],
    'get_block_wrapper_attributes' => ['($extra_attributes is empty ? string : non-falsy-string)', 'extra_attributes' => 'array<string, string>'],
    'get_bookmark' => ["null|(\$output is 'ARRAY_A' ? array<string, mixed> : (\$output is 'ARRAY_N' ? array<int, mixed> : \stdClass))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'"],
    'get_bookmark_field' => ['array<int, int<1, max>>|int|string|\WP_Error', 'field' => "'link_id'|'link_url'|'link_name'|'link_image'|'link_target'|'link_description'|'link_visible'|'link_owner'|'link_rating'|'link_updated'|'link_rel'|'link_notes'|'link_rss'|'link_category'"],
    'get_calendar' => ['($args is array{display: false}&array ? string : void)'],
    'get_categories' => ["(\$args is array{fields: 'count'}&array ? list<numeric-string> : (\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'}&array ? list<int> : array<int, \WP_Term>)))))"],
    'get_category' => ["(\$category is object ? array<array-key, mixed>|\WP_Term : array<array-key, mixed>|\WP_Term|\WP_Error|null) & (\$output is 'ARRAY_A' ? array<string, mixed>|\WP_Error|null : (\$output is 'ARRAY_N' ? array<int, mixed>|\WP_Error|null : \WP_Term|\WP_Error|null))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'"],
    'get_category_by_path' => ["(\$output is 'ARRAY_A' ? array<string, mixed>|\WP_Error|null : (\$output is 'ARRAY_N' ? array<int, mixed>|\WP_Error|null : \WP_Term|\WP_Error|null))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'"],
    'get_comment' => ["(\$comment is \WP_Comment ? array<array-key, mixed>|\WP_Comment : array<array-key, mixed>|\WP_Comment|null) & (\$output is 'ARRAY_A' ? array<string, mixed>|null : (\$output is 'ARRAY_N' ? array<int, mixed>|null : \WP_Comment|null))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'"],
    'get_comments_pagination_arrow' => ['non-falsy-string|null'],
    'get_compat_media_markup' => ['array{item: string, meta: string}'],
    'get_current_blog_id' => ['int<0, max>'],
    'get_current_user_id' => ['int<0, max>'],
    'get_default_link_to_edit' => ["object{link_url: string, link_name: string, link_visible: 'Y'}&\stdClass", '@phpstan-impure' => ''],
    'get_html_split_regex' => ['non-falsy-string', '@phpstan-pure' => ''],
    'get_media_item' => ['non-falsy-string'],
    'get_object_taxonomies' => ["(\$output is 'names' ? array<int, string> : array<string, \WP_Taxonomy>)"],
    'get_page_by_path' => ["(\$output is 'ARRAY_A' ? array<string, mixed>|null : (\$output is 'ARRAY_N' ? array<int, mixed>|null : \WP_Post|null))"],
    'get_password_reset_key' => [null, '@phpstan-impure' => ''],
    'get_permalink' => ['($post is \WP_Post ? string : string|false)'],
    'get_post' => ["(\$post is \WP_Post ? array<array-key, mixed>|\WP_Post : array<array-key, mixed>|\WP_Post|null) & (\$output is 'ARRAY_A' ? array<string, mixed>|null : (\$output is 'ARRAY_N' ? array<int, mixed>|null : \WP_Post|null))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'" ],
    'get_post_ancestors' => ['list<int>'],
    'get_post_permalink' => ['($post is \WP_Post ? string : string|false)'],
    'get_post_stati' => ["(\$output is 'names' ? array<string, string> : array<string, \stdClass>)"],
    'get_post_types' => ["(\$output is 'names' ? array<string, string> : array<string, \WP_Post_Type>)"],
    'get_posts' => ["(\$args is array{fields: 'id=>parent'|'ids'}&array ? array<int, int> : array<int, \WP_Post>)"],
    'get_plugin_page_hookname' => ['non-falsy-string'],
    'get_query_pagination_arrow' => ['non-falsy-string|null'],
    'get_shortcode_regex' => ['non-falsy-string'],
    'get_shortcode_atts_regex' => ['non-falsy-string', '@phpstan-pure' => ''],
    'get_shortcode_tags_in_content' => ['list<non-empty-string>'],
    'get_site_screen_help_tab_args' => ["array{id: 'overview', title: string, content: non-falsy-string}"],
    'get_site_screen_help_sidebar_content' => ['non-falsy-string'],
    'get_sites' => ["(\$args is array{count: true}&array ? int : (\$args is array{fields: 'ids'}&array ? array<int, int> : array<int, \WP_Site>))"],
    'get_submit_button' => ['non-falsy-string'],
    'get_tag_regex' => ['non-falsy-string'],
    'get_tags' => ["(\$args is array{fields: 'count'}&array ? numeric-string : (\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'}&array ? list<int> : array<int, \WP_Term>)))))|\WP_Error"],
    'get_taxonomies' => ["(\$output is 'names' ? array<int, string> : array<int, \WP_Taxonomy>)"],
    'get_taxonomies_for_attachments' => ["(\$output is 'names' ? array<int, string> : array<string, \WP_Taxonomy>)"],
    'get_term' => ["(\$output is 'ARRAY_A' ? array<string, string|int>|\WP_Error|null : (\$output is 'ARRAY_N' ? list<string|int>|\WP_Error|null : \WP_Term|\WP_Error|null))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'"],
    'get_term_by' => ["false|(\$output is 'ARRAY_A' ? array<string, string|int> : (\$output is 'ARRAY_N' ? list<string|int> : \WP_Term))"],
    'get_terms' => ["(\$args is array{fields: 'count'}&array ? numeric-string : (\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'}&array ? list<int> : array<int, \WP_Term>)))))|\WP_Error"],
    'get_the_permalink' => ['($post is \WP_Post ? string : string|false)'],
    'get_user' => ['($user_id is int<min, 0> ? false : \WP_User|false)'],
    'get_user_by' => ["(\$field is 'id'|'ID' ? (\$value is int<min, 0> ? false : \WP_User|false) : \WP_User|false)"],
    'has_action' => ['($callback is false ? bool : false|int)'],
    'has_filter' => ['($callback is false ? bool : false|int)'],
    'has_shortcode' => ['($tag is empty ? false : ($content is empty ? false : bool))', '@phpstan-assert-if-true =non-falsy-string $content' => '', '@phpstan-assert-if-true =non-empty-string $tag' => ''],
    'have_posts' => [null, '@phpstan-impure' => ''],
    'image_link_input_fields' => ['non-falsy-string'],
    'image_size_input_fields' => ["array{label: string, input: 'html', html: string}"],
    'is_new_day' => ['0|1'],
    'is_term' => ["(\$term is 0 ? 0 : (\$term is '' ? null : (\$taxonomy is '' ? string|null : array{term_id: string, term_taxonomy_id: string}|null)))"],
    'is_wp_error' => ['($thing is \WP_Error ? true : false)', '@phpstan-assert-if-true' => '\WP_Error $thing'],
    'maybe_serialize' => ['(T is array|object|string ? string : T)', '@phpstan-template T' => 'of mixed', 'data' => 'T'],
    'mysql2date' => ["(\$format is 'G'|'U' ? int|false : string|false)"],
    'next_posts' => ['($display is true ? void : string)'],
    'paginate_links' => ["(\$args is array{total: int<min, 1>}&array ? void : (\$args is array{type: 'array'}&array ? list<string> : string))"],
    'post_type_archive_title' => ['($display is true ? void : string|void)'],
    'prep_atom_text_construct' => ["array{'html'|'text'|'xhtml', string}"],
    'previous_posts' => ['($display is true ? void : string)'],
    'rawurlencode_deep' => ['T', '@phpstan-template T' => '', 'value' => 'T'],
    'register_activation_hook' => ['void', 'callback' => 'callable(bool): void'],
    'register_deactivation_hook' => ['void', 'callback' => 'callable(bool): void'],
    'register_nav_menus' => [null, 'locations' => 'array<string, string>'],
    'register_post_type' => [null, 'post_type' => 'lowercase-string&non-empty-string'],
    'register_uninstall_hook' => ['void', 'callback' => 'callable(): void'],
    'register_widget' => ['void', 'widget' => 'class-string<\WP_Widget>|\WP_Widget'],
    'render_block_core_categories' => ['non-falsy-string'],
    'rest_authorization_required_code' => ['401|403'],
    'rest_sanitize_boolean' => ["(T is bool ? T : (T is ''|'false'|'FALSE'|'0'|0 ? false : true))", '@phpstan-template T' => 'of bool|string|int', 'value' => 'T', '@phpstan-pure' => ''],
    'rest_ensure_response' => ['($response is \WP_Error ? \WP_Error : \WP_REST_Response)'],
    'sanitize_bookmark_field' => ['array<int, int>|int|string', 'field' => "'link_id'|'link_url'|'link_name'|'link_image'|'link_target'|'link_description'|'link_visible'|'link_owner'|'link_rating'|'link_updated'|'link_rel'|'link_notes'|'link_rss'|'link_category'"],
    'sanitize_category' => ['T', '@phpstan-template T' => 'of array|object', 'category' => 'T'],
    'sanitize_post' => ['(T is \WP_Post ? \WP_Post : (T is object ? object : (T is array ? array : T)))', '@phpstan-template T' => 'of mixed', 'post' => 'T'],
    'sanitize_post_field' => ["(\$field is 'ID'|'post_parent'|'menu_order' ? (T is int ? T : int) : (\$field is 'ancestors' ? (T is array<int<0, max>>|list<int<0, max>> ? T : (T is list ? list<int<0, max>> : array<int<0, max>>)) : (\$context is 'raw' ? T : (\$context is 'attribute'|'js' ? string : (\$context is 'edit' ? (\$field is not 'post_content' ? string : mixed) : mixed)))))", '@phpstan-template T' => 'of mixed', 'value' => 'T'],
    'sanitize_sql_orderby' => ['(T is non-falsy-string ? T|false : false)', '@phpstan-template T' => 'of string', 'orderby' => 'T'],
    'sanitize_term' => ['T', '@phpstan-template T' => 'of array|object', 'term' => 'T'],
    'sanitize_term_field' => ["(\$field is 'parent'|'term_id'|'count'|'term_group'|'term_taxonomy_id'|'object_id' ? int<0, max> : (\$context is 'raw' ? T : (\$context is 'attribute'|'edit'|'js' ? string : mixed)))", '@phpstan-template T' => 'of string', 'value' => 'T'],
    'sanitize_title_with_dashes' => ['lowercase-string', 'context' => "'display'|'save'"],
    'shortcode_exists' => [null, '@phpstan-assert-if-true =non-empty-string $tag' => ''],
    'single_cat_title' => ['($display is true ? void : string|void)'],
    'single_month_title' => ['($display is true ? false|void : false|string)'],
    'single_post_title' => ['($display is true ? void : string|void)'],
    'single_tag_title' => ['($display is true ? void : string|void)'],
    'single_term_title' => ['($display is true ? void : string|void)'],
    'size_format' => ["(\$bytes is not numeric ? false : (\$bytes is int<min, -1>|'0' ? false : string))"],
    'stripslashes_deep' => ['T', '@phpstan-template T' => '', 'value' => 'T'],
    'stripslashes_from_strings_only' => ["(\$value is string ? (\$value is '' ? '' : string) : T)", '@phpstan-template T' => '', 'value' => 'T|string', '@phpstan-pure' => ''],
    'tag_exists' => ["(\$tag_name is 0 ? 0 : (\$tag_name is '' ? null : array{term_id: string, term_taxonomy_id: string}|null))"],
    'taxonomy_exists' => ['($taxonomy is non-falsy-string ? bool : false)', '@phpstan-assert-if-true' => '=non-falsy-string $taxonomy'],
    'term_exists' => ["(\$term is 0 ? 0 : (\$term is '' ? null : (\$taxonomy is '' ? string|null : array{term_id: string, term_taxonomy_id: string}|null)))"],
    'the_date' => ['($display is true ? void : string)'],
    'the_modified_date' => ['($display is true ? void : string)'],
    'the_title' => ['($display is true ? void : string|void)'],
    'trailingslashit' => ['non-falsy-string', '@phpstan-pure' => ''],
    'untrailingslashit' => [null, '@phpstan-pure' => ''],
    'urldecode_deep' => ['T', '@phpstan-template T' => '', 'value' => 'T'],
    'urlencode_deep' => ['T', '@phpstan-template T' => '', 'value' => 'T'],
    'validate_file' => ["(\$file is '' ? 0 : (\$allowed_files is empty ? 0|1|2 : 0|1|2|3))"],
    'validate_plugin' => ['($plugin is empty ? \WP_Error : 0|\WP_Error)'],
    'wp_caption_input_textarea' => ['non-falsy-string'],
    'wp_clear_scheduled_hook' => ['(int<0, max>|($wp_error is false ? false : \WP_Error))', 'args' => $cronArgsType],
    'wp_count_terms' => ['numeric-string|\WP_Error'],
    'wp_create_nonce' => ['lowercase-string&non-falsy-string', 'action' => '-1|string'],
    'wp_debug_backtrace_summary' => ['($pretty is true ? string : list<string>)'],
    'wp_die' => ['($args is array{exit: false}&array ? void : never)'],
    'wp_dropdown_languages' => ["(\$args is array{id: null|''}&array ? void : (\$args is array{name: null|''}&array ? void : string))"],
    'wp_extract_urls' => ['($content is empty ? array{} : list<string>)'],
    'wp_fast_hash' => ['non-falsy-string'],
    'wp_generate_password' => [null, '@phpstan-impure' => ''],
    'wp_generate_tag_cloud' => ["(\$args is array{format: 'array'}&array ? array<int, string> : string)"],
    'wp_generate_uuid4' => ['lowercase-string&non-falsy-string', '@phpstan-impure' => ''],
    'wp_get_archives' => ['($args is array{echo: false|0}&array ? string|void : void)'],
    'wp_get_comment_status' => ["'approved'|'spam'|'trash'|'unapproved'|false"],
    'wp_get_inline_script_tag' => ['non-falsy-string', 'attributes' => 'array<string, string|true>'],
    'wp_get_link_cats' => ['($link_id is empty ? array{} : array<int, int<1, max>>)'],
    'wp_get_object_terms' => ["(\$object_ids is empty ? array{} : (\$taxonomies is empty ? array{} : ((\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'}&array ? list<int> : (\$args is array{fields: 'count'}&array ? numeric-string : array<int, \WP_Term>)))))|\WP_Error)))"],
    'wp_get_post_categories' => ["(\$post_id is 0 ? array{} : ((\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'all'|'all_with_object_id'}&array ? array<int, \WP_Term> : (\$args is array{fields: 'count'}&array ? numeric-string : list<int>)))))|\WP_Error))"],
    'wp_get_post_tags' => ["(\$post_id is 0 ? array{} : ((\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'}&array ? list<int> : (\$args is array{fields: 'count'}&array ? numeric-string : array<int, \WP_Term>)))))|\WP_Error))"],
    'wp_get_post_terms' => ["(\$post_id is 0 ? array{} : (\$taxonomy is empty ? array{} : ((\$args is array{fields: 'names'|'slugs'}&array ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'}&array ? array<int, string> : (\$args is array{fields: 'id=>parent'}&array ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'}&array ? list<int> : (\$args is array{fields: 'count'}&array ? numeric-string : array<int, \WP_Term>)))))|\WP_Error)))"],
    'wp_get_schedule' => [null, 'args' => $cronArgsType],
    'wp_get_scheduled_event' => [null, 'args' => $cronArgsType],
    'wp_get_script_tag' => ['non-falsy-string', 'attributes' => 'array<string, string|true>'],
    'wp_get_server_protocol' => ["'HTTP/1.0'|'HTTP/1.1'|'HTTP/2'|'HTTP/2.0'|'HTTP/3'"],
    'wp_get_speculation_rules_configuration' => ["array{mode: 'prefetch'|'prerender', eagerness: 'conservative'|'eager'|'moderate'}|null"],
    'wp_get_word_count_type' => ["'characters_excluding_spaces'|'characters_including_spaces'|'words'"],
    'wp_get_wp_version' => ['non-falsy-string'],
    'wp_hash' => ['lowercase-string&non-falsy-string', 'scheme' => "'auth'|'logged_in'|'nonce'|'secure_auth'"],
    'wp_html_split' => ['non-empty-list<string>'],
    'wp_http_validate_url' => ["(TUrl is numeric|'' ? false : TUrl|false)", '@phpstan-template TUrl' => 'of string', 'url' => 'TUrl'],
    'wp_insert_attachment' => ['($wp_error is false ? int<0, max> : int<1, max>|\WP_Error)'],
    'wp_insert_category' => ['($wp_error is false ? int<0, max> : int<1, max>|\WP_Error)'],
    'wp_insert_link' => ['($wp_error is false ? int<0, max> : int<0, max>|\WP_Error)'],
    'wp_insert_post' => ['($wp_error is false ? int<0, max> : int<1, max>|\WP_Error)'],
    'wp_internal_hosts' => ['array<lowercase-string>'],
    'wp_is_numeric_array' => ['(T is array<int, mixed> ? true : false)', '@phpstan-template T' => 'of mixed', 'data' => 'T', '@phpstan-assert-if-true' => '(T is list ? T : array<int, mixed>) $data', '@phpstan-pure' => ''],
    'wp_is_post_revision' => ['($post is \WP_Post ? false|int<0, max> : ($post is int<min, 0> ? false : false|int<0, max>))'],
    'wp_is_uuid' => ['($version is 4|null ? bool : false)', 'uuid' => 'TUuid', 'version' => '4', '@phpstan-template TUuid' => 'of string', '@phpstan-assert-if-true' => '=TUuid&lowercase-string&non-falsy-string $uuid', '@phpstan-pure' => ''],
    'wp_json_encode' => ['non-empty-string|false', 'depth' => 'int<1, max>'],
    'wp_list_bookmarks' => ['($args is array{echo: false|0}&array ? string : void)'],
    'wp_list_categories' => ['($args is array{echo: false|0}&array ? string|false : false|void)'],
    'wp_list_pages' => ['($args is array{echo: false}&array ? string : void)'],
    'wp_loginout' => ['($display is true ? void : string)'],
    'wp_media_insert_url_form' => ['non-falsy-string'],
    'wp_nav_menu_manage_columns' => ["array{_title: string, cb: '<input type=\"checkbox\" />', link-target: string, title-attribute: string, css-classes: string, xfn: string, description: string}"],
    'wp_next_scheduled' => [null, 'args' => $cronArgsType],
    'wp_nonce_field' => [null, 'action' => '-1|string'],
    'wp_nonce_tick' => [null, 'action' => '-1|string', '@phpstan-impure' => ''],
    'wp_nonce_url' => [null, 'action' => '-1|string'],
    'wp_parse_list' => ['($input_list is array ? array<scalar> : list<string>)'],
    'wp_parse_str' => [null, '@phpstan-param-out' => 'array<int|string, array|string> $result'],
    'wp_rand' => [null, '@phpstan-impure' => ''],
    'wp_register' => ['($display is true ? void : string)'],
    'wp_remote_get' => [$httpReturnType],
    'wp_remote_head' => [$httpReturnType],
    'wp_remote_post' => [$httpReturnType],
    'wp_remote_request' => [$httpReturnType],
    'wp_reschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
    'wp_robots_max_image_preview_large' => ['array<string, bool|string>', 'robots' => 'array<string, bool|string>'],
    'wp_robots_no_robots' => ['array<string, bool|string>', 'robots' => 'array<string, bool|string>'],
    'wp_robots_noindex' => ['array<string, bool|string>', 'robots' => 'array<string, bool|string>'],
    'wp_robots_noindex_embeds' => ['array<string, bool|string>', 'robots' => 'array<string, bool|string>'],
    'wp_robots_noindex_search' => ['array<string, bool|string>', 'robots' => 'array<string, bool|string>'],
    'wp_robots_sensitive_page' => ['array<string, bool|string>', 'robots' => 'array<string, bool|string>'],
    'wp_safe_remote_get' => [$httpReturnType],
    'wp_safe_remote_head' => [$httpReturnType],
    'wp_safe_remote_post' => [$httpReturnType],
    'wp_safe_remote_request' => [$httpReturnType],
    'wp_schedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
    'wp_schedule_single_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
    'wp_scripts_get_suffix' => ["''|'.min'"],
    'wp_set_comment_status' => ['($wp_error is false ? bool : true|\WP_Error)'],
    'wp_slash' => ['($value is string ? string : array)', '@phpstan-pure' => ''],
    'wp_tag_cloud' => ["(\$args is array{format: 'array'}&array ? array<int, string>|void : (\$args is array{echo: false|0}&array ? string|void : void))"],
    'wp_title' => ['($display is true ? void : string)'],
    'wp_trigger_error' => [null, 'error_level' => '\E_USER_ERROR|\E_USER_WARNING|\E_USER_NOTICE|\E_USER_DEPRECATED'],
    'wp_unique_id' => ['($prefix is empty ? numeric-string : ($prefix is numeric ? numeric-string : string))&non-falsy-string', '@phpstan-impure' => ''],
    'wp_unique_id_from_values' => ['($prefix is lowercase-string ? lowercase-string&non-falsy-string : non-falsy-string)', 'data' => 'non-empty-array'],
    'wp_unique_prefixed_id' => ['($prefix is empty ? numeric-string : ($prefix is numeric ? numeric-string : string))&non-falsy-string', '@phpstan-impure' => ''],
    'wp_unschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
    'wp_unschedule_hook' => ['($wp_error is false ? int<0, max>|false : int<0, max>|\WP_Error)'],
    'wp_unslash' => ['T', '@phpstan-template T' => '', 'value' => 'T'],
    'wp_update_category' => ['int<0, max>|false'],
    'wp_update_comment' => ['($wp_error is false ? 0|1|false : 0|1|\WP_Error)'],
    'wp_update_link' => ['int<0, max>'],
    'wp_update_post' => ['($wp_error is false ? int<0, max> : int<1, max>|\WP_Error)'],
    'wp_verify_nonce' => ['1|2|false', 'action' => '-1|string'],
    'wp_widget_rss_form' => ['void', 'args' => $wpWidgetRssFormArgsType, 'inputs' => $wpWidgetRssFormInputsType],
    'wp_widget_rss_process' => ['array{title: string, url: string, link: string, items: int<1, 20>, error: string|false, show_summary: int, show_author: int, show_date: int}'],
    'wp_widgets_access_body_class' => ['non-falsy-string'],
    'zeroise' => ['($threshold is 0 ? lowercase-string&non-empty-string&numeric-string : ($number is int<0, max> ? lowercase-string&non-empty-string&numeric-string : lowercase-string&non-empty-string))', 'threshold' => 'int<0, max>'],
    // Classes, methods, and properties
    'Custom_Background::$admin_header_callback' => [null, '@phpstan-var' => "''|callable(): void"],
    'Custom_Background::$admin_image_div_callback' => [null, '@phpstan-var' => "''|callable(): void"],
    'Custom_Background::__construct' => [null, 'admin_header_callback' => "''|callable(): void", 'admin_image_div_callback' => "''|callable(): void"],
    'Custom_Image_Header::$admin_header_callback' => [null, '@phpstan-var' => "''|callable(): void"],
    'Custom_Image_Header::$admin_image_div_callback' => [null, '@phpstan-var' => "''|callable(): void"],
    'Custom_Image_Header::__construct' => [null, 'admin_image_div_callback' => "''|callable(): void"],
    'Custom_Image_Header::set_header_image' => [null, 'choice' => 'string|array{attachment_id: int<1, max>, url: string, width: int<0, max>, height: int<0, max>}'],
    'Custom_Image_Header::show_header_selector' => [null, 'type' => "'default'|'uploaded'"],
    'WP_Block_List' => [null, '@phpstan-implements ArrayAccess<int, \WP_Block>' => ''],
    'WP_Block_List::offsetExists' => [null, 'offset' => 'int'],
    'WP_Block_List::offsetGet' => ['\WP_Block|null', 'offset' => 'int'],
    'WP_Block_List::offsetSet' => ['void', 'offset' => 'int|null'],
    'WP_Block_List::offsetUnset' => ['void', 'offset' => 'int'],
    'WP_Dependencies::$groups' => [null, '@phpstan-var' => 'array<string, int|false>'],
    'WP_Dependencies::get_etag' => ['non-falsy-string'],
    'WP_Dependencies::query' => ["(\$handle is not non-empty-string ? false : (\$status is not TStatus ? false : (\$status is 'registered'|'scripts' ? _WP_Dependency|false : bool)))", '@phpstan-template TStatus' => "'registered'|'scripts'|'enqueued'|'queued'|'to_do'|'to_print'|'done'|'printed'"],
    'WP_Filesystem_Base::dirlist' => [$filesystemDirlistReturnType],
    'WP_Filesystem_Direct::dirlist' => [$filesystemDirlistReturnType],
    'WP_Filesystem_FTPext::dirlist' => [$filesystemDirlistReturnType],
    'WP_Filesystem_ftpsockets::dirlist' => [$filesystemDirlistReturnType],
    'WP_Filesystem_SSH2::dirlist' => [$filesystemDirlistReturnType],
    'WP_Http::get' => [$httpReturnType],
    'WP_Http::head' => [$httpReturnType],
    'WP_Http::post' => [$httpReturnType],
    'WP_Http::request' => [$httpReturnType],
    'WP_List_Table::set_pagination_args' => ['void', 'args' => 'array{total_items?: int, total_pages?: int, per_page?: int}'],
    'WP_Locale::$word_count_type' => [null, '@phpstan-var' => "'characters_excluding_spaces'|'characters_including_spaces'|'words'"],
    'WP_Locale::get_word_count_type' => ["'characters_excluding_spaces'|'characters_including_spaces'|'words'"],
    'WP_Query' => [null, '@phpstan-property-read bool $query_vars_changed' => '', '@phpstan-property-read bool|string $query_vars_hash' => '', '@phpstan-method void init_query_flags()' => ''],
    'WP_Query::have_posts' => [null, '@phpstan-impure' => ''],
    'WP_REST_Request' => [null, '@phpstan-template T' => 'of array = array<string, mixed>', '@phpstan-implements ArrayAccess<key-of<T>, value-of<T>>' => ''],
    'WP_REST_Request::get_param' => ['T[TOffset]|null', '@phpstan-template TOffset' => 'of key-of<T>', 'key' => 'TOffset'],
    'WP_REST_Request::get_params' => ['T'],
    'WP_REST_Request::has_param' => [null, 'key' => 'key-of<T>'],
    'WP_REST_Request::offsetExists' => [null, 'offset' => 'key-of<T>'],
    'WP_REST_Request::offsetGet' => ['T[TOffset]|null', '@phpstan-template TOffset' => 'of key-of<T>', 'offset' => 'TOffset'],
    'WP_REST_Request::offsetSet' => ['void', '@phpstan-template TOffset' => 'of key-of<T>', 'offset' => 'TOffset', 'value' => 'T[TOffset]'],
    'WP_REST_Request::offsetUnset' => ['void', '@phpstan-template TOffset' => 'of key-of<T>', 'offset' => 'TOffset'],
    'WP_REST_Request::set_param' => ['void', '@phpstan-template TOffset' => 'of key-of<T>', 'key' => 'TOffset', 'value' => 'T[TOffset]'],
    'WP_Theme' => [
        null,
        '@phpstan-type ThemeKey' => "'Name'|'Version'|'Status'|'Title'|'Author'|'Author Name'|'Author URI'|'Description'|'Template'|'Stylesheet'|'Template Files'|'Stylesheet Files'|'Template Dir'|'Stylesheet Dir'|'Screenshot'|'Tags'|'Theme Root'|'Theme Root URI'|'Parent Theme'",
        '@phpstan-property-read string $name' => '',
        '@phpstan-property-read string $title' => '',
        '@phpstan-property-read string $version' => '',
        '@phpstan-property-read string $parent_theme' => '',
        '@phpstan-property-read string $template_dir' => '',
        '@phpstan-property-read string $stylesheet_dir' => '',
        '@phpstan-property-read string $template' => '',
        '@phpstan-property-read string $stylesheet' => '',
        '@phpstan-property-read string $screenshot' => '',
        '@phpstan-property-read string $description' => '',
        '@phpstan-property-read string $author' => '',
        '@phpstan-property-read list<string> $tags' => '',
        '@phpstan-property-read string $theme_root' => '',
        '@phpstan-property-read string $theme_root_uri' => '',
    ],
    'WP_Theme::get' => ["(\$header is 'Name'|'ThemeURI'|'Description'|'Author'|'AuthorURI'|'Version'|'Template'|'Status'|'Tags'|'TextDomain'|'DomainPath'|'RequiresWP'|'RequiresPHP'|'UpdateURI' ? (\$header is 'Tags' ? string[] : string) : false)"],
    'WP_Theme::offsetExists' => ['($offset is ThemeKey ? true : false)'],
    'WP_Theme::offsetGet' => ['($offset is ThemeKey ? mixed : null)'],
    'WP_Translations::translate' => ['($singular is null ? null : string)'],
    'WP_Translations::translate_plural' => ['($singular is null ? null : ($plural is null ? T : string))', '@phpstan-template T' => 'of string|null', 'singular' => 'T', 'count' => 'int'],
    'WP_Widget' => [null, '@phpstan-template T' => 'of array = array<string, mixed>'],
    'WP_Widget::display_callback' => [null, '@final' => ''],
    'WP_Widget::form' => [null, 'instance' => 'T'],
    'WP_Widget::form_callback' => [null, '@final' => ''],
    'WP_Widget::get_field_id' => ['non-falsy-string'],
    'WP_Widget::get_field_name' => ['non-falsy-string'],
    'WP_Widget::update' => [null, 'new_instance' => 'T', 'old_instance' => 'T'],
    'WP_Widget::update_callback' => [null, '@final' => ''],
    'WP_Widget::widget' => [null, 'instance' => 'T', 'args' => 'array{name:string,id:string,description:string,class:string,before_widget:string,after_widget:string,before_title:string,after_title:string,before_sidebar:string,after_sidebar:string,show_in_rest:boolean,widget_id:string,widget_name:string}'],
    'WP_Widget_Factory::$widgets' => [null, '@phpstan-var' => 'array<string, \WP_Widget>'],
    'WP_Widget_Factory::register' => [null, 'widget' => 'class-string<\WP_Widget>|\WP_Widget'],
    'WP_Widget_Factory::unregister' => [null, 'widget' => 'class-string<\WP_Widget>|\WP_Widget'],
    'wpdb::get_results' => ["null|(\$output is 'ARRAY_A' ? list<array<array-key, mixed>> : (\$output is 'ARRAY_N' ? list<array<int, mixed>> : (\$output is 'OBJECT_K' ? array<array-key, \stdClass> : list<\stdClass>)))", 'output' => "'OBJECT'|'OBJECT_K'|'ARRAY_A'|'ARRAY_N'"],
    'wpdb::get_row' => ["null|void|(\$output is 'ARRAY_A' ? array<array-key, mixed> : (\$output is 'ARRAY_N' ? list<mixed> : \stdClass))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'", 'y' => 'int<0, max>'],
    'wpdb::prepare' => [null, 'query' => 'literal-string'],
];
