|
43 | 43 | 'bool_from_yn' => ["(\$yn is 'y' ? true : false)"],
|
44 | 44 | 'have_posts' => [null, '@phpstan-impure' => ''],
|
45 | 45 | 'is_new_day' => ['0|1'],
|
46 |
| - 'paginate_links' => ["(\$args is array{total: int<min, 1>} ? void : (\$args is array{type: 'array'} ? list<string> : string))"], |
| 46 | + 'paginate_links' => ["(\$args is array{total: int<min, 1>}&array ? void : (\$args is array{type: 'array'}&array ? list<string> : string))"], |
47 | 47 | 'rawurlencode_deep' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
48 | 48 | 'sanitize_category' => ['T', '@phpstan-template' => 'T of array|object', 'category' => 'T'],
|
49 | 49 | 'sanitize_post' => ['T', '@phpstan-template' => 'T of array|object', 'post' => 'T'],
|
|
53 | 53 | 'urldecode_deep' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
54 | 54 | 'urlencode_deep' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
55 | 55 | 'validate_file' => ["(\$file is '' ? 0 : (\$allowed_files is empty ? 0|1|2 : 0|1|2|3))"],
|
56 |
| - 'wp_die' => ['($args is array{exit: false} ? void : never)'], |
57 |
| - 'wp_dropdown_languages' => ["(\$args is array{id: null|''} ? void : (\$args is array{name: null|''} ? void : string))"], |
| 56 | + 'wp_die' => ['($args is array{exit: false}&array ? void : never)'], |
| 57 | + 'wp_dropdown_languages' => ["(\$args is array{id: null|''}&array ? void : (\$args is array{name: null|''}&array ? void : string))"], |
58 | 58 | 'wp_clear_scheduled_hook' => ['(0|positive-int|($wp_error is false ? false : \WP_Error))', 'args' => $cronArgsType],
|
59 |
| - 'wp_generate_tag_cloud' => ["(\$args is array{format: 'array'} ? array<int, string> : string)"], |
| 59 | + 'wp_generate_tag_cloud' => ["(\$args is array{format: 'array'}&array ? array<int, string> : string)"], |
60 | 60 | 'wp_get_schedule' => [null, 'args' => $cronArgsType],
|
61 | 61 | 'wp_get_scheduled_event' => [null, 'args' => $cronArgsType],
|
62 |
| - 'wp_get_archives' => ['($args is array{echo: false|0} ? string|void : void)'], |
| 62 | + 'wp_get_archives' => ['($args is array{echo: false|0}&array ? string|void : void)'], |
63 | 63 | 'WP_Http::get' => [$httpReturnType],
|
64 | 64 | 'WP_Http::head' => [$httpReturnType],
|
65 | 65 | 'WP_Http::post' => [$httpReturnType],
|
66 | 66 | 'WP_Http::request' => [$httpReturnType],
|
67 | 67 | 'wp_is_numeric_array' => ['(T is array ? (key-of<T> is int ? true : false) : false)', '@template' => 'T of mixed', 'data' => 'T', '@phpstan-assert-if-true' => '(T is list ? T : array<int, value-of<T>>) $data'],
|
68 |
| - 'wp_list_bookmarks' => ['($args is array{echo: false|0} ? string : void)'], |
69 |
| - 'wp_list_categories' => ['($args is array{echo: false|0} ? string|false : false|void)'], |
70 |
| - 'wp_list_pages' => ['($args is array{echo: false} ? string : void)'], |
| 68 | + 'wp_list_bookmarks' => ['($args is array{echo: false|0}&array ? string : void)'], |
| 69 | + 'wp_list_categories' => ['($args is array{echo: false|0}&array ? string|false : false|void)'], |
| 70 | + 'wp_list_pages' => ['($args is array{echo: false}&array ? string : void)'], |
71 | 71 | 'WP_List_Table::set_pagination_args' => ['void', 'args' => 'array{total_items?: int, total_pages?: int, per_page?: int}'],
|
72 | 72 | 'wp_next_scheduled' => [null, 'args' => $cronArgsType],
|
73 | 73 | 'WP_Query::have_posts' => [null, '@phpstan-impure' => ''],
|
|
83 | 83 | 'wp_schedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
|
84 | 84 | 'wp_schedule_single_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
|
85 | 85 | 'wp_slash' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
86 |
| - 'wp_tag_cloud' => ["(\$args is array{format: 'array'} ? array<int, string>|void : (\$args is array{echo: false|0} ? string|void : void))"], |
| 86 | + 'wp_tag_cloud' => ["(\$args is array{format: 'array'}&array ? array<int, string>|void : (\$args is array{echo: false|0}&array ? string|void : void))"], |
87 | 87 | 'wp_trigger_error' => [null, 'function_name' => 'callable-string', 'error_level' => '\E_USER_ERROR|\E_USER_WARNING|\E_USER_NOTICE|\E_USER_DEPRECATED'],
|
88 | 88 | 'wp_unique_id' => ['($prefix is empty ? numeric-string : ($prefix is numeric ? numeric-string : string))'],
|
89 | 89 | 'wp_unschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
|
|
182 | 182 | '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' => '0|positive-int'],
|
183 | 183 | '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'"],
|
184 | 184 | 'get_bookmark' => ["null|(\$output is 'ARRAY_A' ? array<string, mixed> : (\$output is 'ARRAY_N' ? array<int, mixed> : \stdClass))", 'output' => "'OBJECT'|'ARRAY_A'|'ARRAY_N'"],
|
185 |
| - 'get_categories' => ["(\$args is array{fields: 'count'} ? list<numeric-string> : (\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'} ? list<int> : array<int, \WP_Term>)))))"], |
| 185 | + '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>)))))"], |
186 | 186 | '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'"],
|
187 | 187 | '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'"],
|
188 | 188 | 'WP_Widget' => [null, '@phpstan-template' => 'T of array<string, mixed>'],
|
189 | 189 | 'WP_Widget::form' => [null, 'instance' => 'T'],
|
190 | 190 | 'WP_Widget::update' => [null, 'new_instance' => 'T', 'old_instance' => 'T'],
|
191 | 191 | '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}'],
|
192 |
| - 'get_approved_comments' => ["(\$args is array{count: true} ? int : (\$args is array{fields: 'ids'} ? array<int, int> : array<int, \WP_Comment>))"], |
193 |
| - 'get_posts' => ["(\$args is array{fields: 'id=>parent'|'ids'} ? array<int, int> : array<int, \WP_Post>)"], |
194 |
| - 'get_sites' => ["(\$args is array{count: true} ? int : (\$args is array{fields: 'ids'} ? array<int, int> : array<int, \WP_Site>))"], |
195 |
| - 'get_tags' => ["(\$args is array{fields: 'count'} ? numeric-string : (\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'} ? list<int> : array<int, \WP_Term>)))))|\WP_Error"], |
196 |
| - 'get_terms' => ["(\$args is array{fields: 'count'} ? numeric-string : (\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'} ? list<int> : array<int, \WP_Term>)))))|\WP_Error"], |
197 |
| - 'wp_get_post_categories' => ["(\$post_id is 0 ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'all'|'all_with_object_id'} ? array<int, \WP_Term> : (\$args is array{fields: 'count'} ? numeric-string : list<int>)))))|\WP_Error))"], |
198 |
| - 'wp_get_post_tags' => ["(\$post_id is 0 ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'} ? list<int> : (\$args is array{fields: 'count'} ? numeric-string : array<int, \WP_Term>)))))|\WP_Error))"], |
199 |
| - 'wp_get_post_terms' => ["(\$post_id is 0 ? array{} : (\$taxonomy is empty ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'} ? list<int> : (\$args is array{fields: 'count'} ? numeric-string : array<int, \WP_Term>)))))|\WP_Error)))"], |
200 |
| - 'wp_get_object_terms' => ["(\$object_ids is empty ? array{} : (\$taxonomies is empty ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list<string> : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array<int, string> : (\$args is array{fields: 'id=>parent'} ? array<int, int> : (\$args is array{fields: 'ids'|'tt_ids'} ? list<int> : (\$args is array{fields: 'count'} ? numeric-string : array<int, \WP_Term>)))))|\WP_Error)))"], |
| 192 | + 'get_approved_comments' => ["(\$args is array{count: true}&array ? int : (\$args is array{fields: 'ids'}&array ? array<int, int> : array<int, \WP_Comment>))"], |
| 193 | + 'get_posts' => ["(\$args is array{fields: 'id=>parent'|'ids'}&array ? array<int, int> : array<int, \WP_Post>)"], |
| 194 | + 'get_sites' => ["(\$args is array{count: true}&array ? int : (\$args is array{fields: 'ids'}&array ? array<int, int> : array<int, \WP_Site>))"], |
| 195 | + '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"], |
| 196 | + '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"], |
| 197 | + '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))"], |
| 198 | + '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))"], |
| 199 | + '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)))"], |
| 200 | + '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)))"], |
201 | 201 | 'wp_json_encode' => ['non-empty-string|false', 'depth' => 'positive-int'],
|
202 | 202 | 'wp_parse_list' => ['($input_list is array ? array<scalar> : list<string>)'],
|
203 | 203 | 'wp_parse_str' => [null, '@phpstan-param-out' => 'array<int|string, array|string> $result'],
|
|
0 commit comments