|
7 | 7 | }
|
8 | 8 | $cronArgsType = 'list<mixed>';
|
9 | 9 | $wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}';
|
10 |
| -$wpWidgetRssFormInputType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}'; |
| 10 | +$wpWidgetRssFormInputsType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}'; |
11 | 11 | $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}>";
|
12 | 12 |
|
13 | 13 | /**
|
|
31 | 31 | 'stripslashes_deep' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
32 | 32 | 'urldecode_deep' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
33 | 33 | 'urlencode_deep' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
34 |
| - 'wp_clear_scheduled_hook' => ['(0|positive-int|($wp_error is false ? false : \WP_Error))', 'args'=>$cronArgsType], |
35 |
| - 'wp_get_schedule' => [null, 'args'=>$cronArgsType], |
36 |
| - 'wp_get_scheduled_event' => [null, 'args'=>$cronArgsType], |
| 34 | + 'wp_clear_scheduled_hook' => ['(0|positive-int|($wp_error is false ? false : \WP_Error))', 'args' => $cronArgsType], |
| 35 | + 'wp_get_schedule' => [null, 'args' => $cronArgsType], |
| 36 | + 'wp_get_scheduled_event' => [null, 'args' => $cronArgsType], |
37 | 37 | 'WP_Http::get' => [$httpReturnType],
|
38 | 38 | 'WP_Http::head' => [$httpReturnType],
|
39 | 39 | 'WP_Http::post' => [$httpReturnType],
|
40 | 40 | 'WP_Http::request' => [$httpReturnType],
|
41 | 41 | 'WP_List_Table::display_tablenav' => ['void', 'which' => '"top"|"bottom"'],
|
42 | 42 | 'WP_List_Table::pagination' => ['void', 'which' => '"top"|"bottom"'],
|
43 | 43 | 'WP_List_Table::set_pagination_args' => ['void', 'args' => 'array{total_items?: int, total_pages?: int, per_page?: int}'],
|
44 |
| - 'wp_next_scheduled' => [null, 'args'=>$cronArgsType], |
| 44 | + 'wp_next_scheduled' => [null, 'args' => $cronArgsType], |
45 | 45 | 'WP_Query::have_posts' => [null, '@phpstan-impure' => ''],
|
46 | 46 | 'wp_remote_get' => [$httpReturnType],
|
47 | 47 | 'wp_remote_head' => [$httpReturnType],
|
48 | 48 | 'wp_remote_post' => [$httpReturnType],
|
49 | 49 | 'wp_remote_request' => [$httpReturnType],
|
50 |
| - 'wp_reschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args'=>$cronArgsType], |
| 50 | + 'wp_reschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType], |
51 | 51 | 'wp_safe_remote_get' => [$httpReturnType],
|
52 | 52 | 'wp_safe_remote_head' => [$httpReturnType],
|
53 | 53 | 'wp_safe_remote_post' => [$httpReturnType],
|
54 | 54 | 'wp_safe_remote_request' => [$httpReturnType],
|
55 |
| - 'wp_schedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args'=>$cronArgsType], |
56 |
| - 'wp_schedule_single_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args'=>$cronArgsType], |
| 55 | + 'wp_schedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType], |
| 56 | + 'wp_schedule_single_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType], |
57 | 57 | 'wp_slash' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
58 |
| - 'wp_unschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args'=>$cronArgsType], |
| 58 | + 'wp_unschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType], |
59 | 59 | 'wp_unslash' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
|
60 |
| - 'wp_widget_rss_form' => ['void', 'args'=>$wpWidgetRssFormArgsType, 'input'=>$wpWidgetRssFormInputType], |
| 60 | + 'wp_widget_rss_form' => ['void', 'args' => $wpWidgetRssFormArgsType, 'inputs' => $wpWidgetRssFormInputsType], |
61 | 61 | 'WP_REST_Request' => [null, '@phpstan-template' => 'T of array', '@phpstan-implements' => 'ArrayAccess<key-of<T>, value-of<T>>'],
|
62 | 62 | 'WP_REST_Request::offsetExists' => [null, 'offset' => '@param key-of<T>'],
|
63 | 63 | 'WP_REST_Request::offsetGet' => ['T[TOffset]', '@phpstan-template' => 'TOffset of key-of<T>', 'offset' => 'TOffset'],
|
64 | 64 | 'WP_REST_Request::offsetSet' => ['void', '@phpstan-template' => 'TOffset of key-of<T>', 'offset' => 'TOffset', 'value' => 'T[TOffset]'],
|
65 | 65 | 'WP_REST_Request::offsetUnset' => ['void', '@phpstan-template' => 'TOffset of key-of<T>', 'offset' => 'TOffset'],
|
66 |
| - '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'"], |
| 66 | + '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'"], |
67 | 67 | '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)"],
|
68 | 68 | 'WP_Theme::offsetExists' => ['($offset is ThemeKey ? true : false)'],
|
69 | 69 | 'WP_Theme::offsetGet' => ['($offset is ThemeKey ? mixed : null)'],
|
70 | 70 | 'WP_Block_List' => [null, '@phpstan-implements' => 'ArrayAccess<int, WP_Block>'],
|
71 |
| - 'WP_Block_List::offsetExists' => [null, 'index' => 'int'], |
72 |
| - 'WP_Block_List::offsetGet' => ['WP_Block|null', 'index' => 'int'], |
73 |
| - 'WP_Block_List::offsetSet' => ['void', 'index' => 'int|null'], |
74 |
| - 'WP_Block_List::offsetUnset' => ['void', 'index' => 'int'], |
| 71 | + 'WP_Block_List::offsetExists' => [null, 'offset' => 'int'], |
| 72 | + 'WP_Block_List::offsetGet' => ['WP_Block|null', 'offset' => 'int'], |
| 73 | + 'WP_Block_List::offsetSet' => ['void', 'offset' => 'int|null'], |
| 74 | + 'WP_Block_List::offsetUnset' => ['void', 'offset' => 'int'], |
75 | 75 | 'is_wp_error' => ['($thing is \WP_Error ? true : false)', '@phpstan-assert-if-true' => '\WP_Error $thing'],
|
76 | 76 | 'current_time' => ["(\$type is 'timestamp'|'U' ? int : string)"],
|
77 | 77 | 'mysql2date' => ["(\$format is 'G'|'U' ? int|false : string|false)"],
|
|
0 commit comments