Changeset 65777
- Timestamp:
- 11/25/2026 11:11:52 AM (less than one hour ago)
- Location:
- trunk
- Files:
-
- 16 edited
-
src/wp-admin/includes/media.php (modified) (2 diffs)
-
src/wp-admin/includes/ms.php (modified) (1 diff)
-
src/wp-admin/includes/nav-menu.php (modified) (1 diff)
-
src/wp-admin/includes/post.php (modified) (1 diff)
-
src/wp-includes/class-wp-dependencies.php (modified) (1 diff)
-
src/wp-includes/class-wp-http.php (modified) (5 diffs)
-
src/wp-includes/class-wp-widget.php (modified) (1 diff)
-
src/wp-includes/feed.php (modified) (1 diff)
-
src/wp-includes/formatting.php (modified) (1 diff)
-
src/wp-includes/functions.php (modified) (1 diff)
-
src/wp-includes/http.php (modified) (8 diffs)
-
src/wp-includes/nav-menu.php (modified) (1 diff)
-
src/wp-includes/robots-template.php (modified) (6 diffs)
-
src/wp-includes/shortcodes.php (modified) (1 diff)
-
src/wp-includes/widgets.php (modified) (2 diffs)
-
tests/phpstan/baselines-strict/argument.type.neon (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r65158 r65777 1238 1238 * @param bool|string $check 1239 1239 * @return array<string, string> An array of data for the image size input fields. 1240 * 1241 * @phpstan-return array{label: string, input: 'html', html: string} 1240 1242 */ 1241 1243 function image_size_input_fields( $post, $check = '' ) { … … 1938 1940 * @param array $args 1939 1941 * @return array<string, string> An array containing the media item and its metadata. 1942 * 1943 * @phpstan-return array{item: string, meta: string} 1940 1944 */ 1941 1945 function get_compat_media_markup( $attachment_id, $args = null ) { -
trunk/src/wp-admin/includes/ms.php
r64873 r65777 1188 1188 * 1189 1189 * @return array Help tab arguments. 1190 * 1191 * @phpstan-return array{id: non-falsy-string, title: string, content: non-falsy-string} 1190 1192 */ 1191 1193 function get_site_screen_help_tab_args() { -
trunk/src/wp-admin/includes/nav-menu.php
r65317 r65777 1349 1349 * 1350 1350 * @return string[] Array of column titles keyed by their column name. 1351 * 1352 * @phpstan-return array{ 1353 * _title: string, 1354 * cb: non-falsy-string, 1355 * link-target: string, 1356 * title-attribute: string, 1357 * css-classes: string, 1358 * xfn: string, 1359 * description: string, 1360 * } 1351 1361 */ 1352 1362 function wp_nav_menu_manage_columns() { -
trunk/src/wp-admin/includes/post.php
r65410 r65777 1221 1221 * @param string $type The post_type you want the statuses for. Default 'post'. 1222 1222 * @return string[] An array of all the statuses for the supplied post type. 1223 * 1224 * @phpstan-return list<string> 1223 1225 */ 1224 1226 function get_available_post_statuses( $type = 'post' ) { -
trunk/src/wp-includes/class-wp-dependencies.php
r64585 r65777 74 74 * @since 2.8.0 75 75 * 76 * @var (int|false)[] 76 * @var array<string, int|false> 77 * 78 * @phpstan-var array<non-empty-string, int|false> 77 79 */ 78 80 public $groups = array(); -
trunk/src/wp-includes/class-wp-http.php
r64350 r65777 30 30 * 31 31 * @since 2.7.0 32 * 33 * @phpstan-type HTTP_Response array{ 34 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 35 * body: string, 36 * response: array{code: int|false, message: string|false}, 37 * cookies: WP_Http_Cookie[], 38 * filename?: string|null, 39 * http_response?: WP_HTTP_Requests_Response|null, 40 * } 32 41 */ 33 42 #[AllowDynamicProperties] … … 167 176 * @type WP_HTTP_Requests_Response|null $http_response Response object. 168 177 * } 178 * 179 * @phpstan-return HTTP_Response|WP_Error 169 180 */ 170 181 public function request( $url, $args = array() ) { … … 648 659 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. 649 660 * A WP_Error instance upon error. See WP_Http::response() for details. 661 * 662 * @phpstan-return HTTP_Response|WP_Error 650 663 */ 651 664 public function post( $url, $args = array() ) { … … 666 679 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. 667 680 * A WP_Error instance upon error. See WP_Http::response() for details. 681 * 682 * @phpstan-return HTTP_Response|WP_Error 668 683 */ 669 684 public function get( $url, $args = array() ) { … … 684 699 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. 685 700 * A WP_Error instance upon error. See WP_Http::response() for details. 701 * 702 * @phpstan-return HTTP_Response|WP_Error 686 703 */ 687 704 public function head( $url, $args = array() ) { -
trunk/src/wp-includes/class-wp-widget.php
r64794 r65777 110 110 * 'before_widget', and 'after_widget'. 111 111 * @param array $instance The settings for the particular instance of the widget. 112 * 113 * @phpstan-param array{ 114 * name?: string, 115 * id?: string, 116 * description?: string, 117 * class?: string, 118 * before_widget: string, 119 * after_widget: string, 120 * before_title: string, 121 * after_title: string, 122 * before_sidebar?: string, 123 * after_sidebar?: string, 124 * show_in_rest?: bool, 125 * widget_id?: string, 126 * widget_name?: string, 127 * } $args 112 128 */ 113 129 public function widget( $args, $instance ) { -
trunk/src/wp-includes/feed.php
r64247 r65777 600 600 * @param string $data Input string. 601 601 * @return array array(type, value) 602 * 603 * @phpstan-return array{'html'|'text'|'xhtml', string} 602 604 */ 603 605 function prep_atom_text_construct( $data ) { -
trunk/src/wp-includes/formatting.php
r65776 r65777 612 612 * @param string $input The text which has to be formatted. 613 613 * @return string[] Array of the formatted text. 614 * 615 * @phpstan-return non-empty-list<string> 614 616 */ 615 617 function wp_html_split( $input ) { -
trunk/src/wp-includes/functions.php
r65776 r65777 8395 8395 * @return string The generated unique ID for the array. 8396 8396 * 8397 * @phpstan-param non-empty-array $data 8397 8398 * @phpstan-return ( $prefix is lowercase-string ? lowercase-string&non-falsy-string : non-falsy-string ) 8398 8399 */ -
trunk/src/wp-includes/http.php
r64350 r65777 49 49 * @return array|WP_Error The response or WP_Error on failure. 50 50 * See WP_Http::request() for information on return value. 51 * 52 * @phpstan-return array{ 53 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 54 * body: string, 55 * response: array{code: int|false, message: string|false}, 56 * cookies: WP_Http_Cookie[], 57 * filename?: string|null, 58 * http_response?: WP_HTTP_Requests_Response|null, 59 * }|WP_Error 51 60 */ 52 61 function wp_safe_remote_request( $url, $args = array() ) { … … 78 87 * @return array|WP_Error The response or WP_Error on failure. 79 88 * See WP_Http::request() for information on return value. 89 * 90 * @phpstan-return array{ 91 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 92 * body: string, 93 * response: array{code: int|false, message: string|false}, 94 * cookies: WP_Http_Cookie[], 95 * filename?: string|null, 96 * http_response?: WP_HTTP_Requests_Response|null, 97 * }|WP_Error 80 98 */ 81 99 function wp_safe_remote_get( $url, $args = array() ) { … … 107 125 * @return array|WP_Error The response or WP_Error on failure. 108 126 * See WP_Http::request() for information on return value. 127 * 128 * @phpstan-return array{ 129 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 130 * body: string, 131 * response: array{code: int|false, message: string|false}, 132 * cookies: WP_Http_Cookie[], 133 * filename?: string|null, 134 * http_response?: WP_HTTP_Requests_Response|null, 135 * }|WP_Error 109 136 */ 110 137 function wp_safe_remote_post( $url, $args = array() ) { … … 136 163 * @return array|WP_Error The response or WP_Error on failure. 137 164 * See WP_Http::request() for information on return value. 165 * 166 * @phpstan-return array{ 167 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 168 * body: string, 169 * response: array{code: int|false, message: string|false}, 170 * cookies: WP_Http_Cookie[], 171 * filename?: string|null, 172 * http_response?: WP_HTTP_Requests_Response|null, 173 * }|WP_Error 138 174 */ 139 175 function wp_safe_remote_head( $url, $args = array() ) { … … 163 199 * @return array|WP_Error The response array or a WP_Error on failure. 164 200 * See WP_Http::request() for information on return value. 201 * 202 * @phpstan-return array{ 203 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 204 * body: string, 205 * response: array{code: int|false, message: string|false}, 206 * cookies: WP_Http_Cookie[], 207 * filename?: string|null, 208 * http_response?: WP_HTTP_Requests_Response|null, 209 * }|WP_Error 165 210 */ 166 211 function wp_remote_request( $url, $args = array() ) { … … 184 229 * @return array|WP_Error The response or WP_Error on failure. 185 230 * See WP_Http::request() for information on return value. 231 * 232 * @phpstan-return array{ 233 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 234 * body: string, 235 * response: array{code: int|false, message: string|false}, 236 * cookies: WP_Http_Cookie[], 237 * filename?: string|null, 238 * http_response?: WP_HTTP_Requests_Response|null, 239 * }|WP_Error 186 240 */ 187 241 function wp_remote_get( $url, $args = array() ) { … … 205 259 * @return array|WP_Error The response or WP_Error on failure. 206 260 * See WP_Http::request() for information on return value. 261 * 262 * @phpstan-return array{ 263 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 264 * body: string, 265 * response: array{code: int|false, message: string|false}, 266 * cookies: WP_Http_Cookie[], 267 * filename?: string|null, 268 * http_response?: WP_HTTP_Requests_Response|null, 269 * }|WP_Error 207 270 */ 208 271 function wp_remote_post( $url, $args = array() ) { … … 226 289 * @return array|WP_Error The response or WP_Error on failure. 227 290 * See WP_Http::request() for information on return value. 291 * 292 * @phpstan-return array{ 293 * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array<string, string>, 294 * body: string, 295 * response: array{code: int|false, message: string|false}, 296 * cookies: WP_Http_Cookie[], 297 * filename?: string|null, 298 * http_response?: WP_HTTP_Requests_Response|null, 299 * }|WP_Error 228 300 */ 229 301 function wp_remote_head( $url, $args = array() ) { -
trunk/src/wp-includes/nav-menu.php
r65554 r65777 86 86 * @global array $_wp_registered_nav_menus 87 87 * 88 * @param string[]$locations Associative array of menu location identifiers (like a slug) and descriptive text.88 * @param array<string, string> $locations Associative array of menu location identifiers (like a slug) and descriptive text. 89 89 */ 90 90 function register_nav_menus( $locations = array() ) { -
trunk/src/wp-includes/robots-template.php
r53087 r65777 65 65 * @see wp_robots_no_robots() 66 66 * 67 * @param array $robots Associative array of robots directives.68 * @return array Filtered robots directives.67 * @param array<string, bool|string> $robots Associative array of robots directives. 68 * @return array<string, bool|string> Filtered robots directives. 69 69 */ 70 70 function wp_robots_noindex( array $robots ) { … … 87 87 * @see wp_robots_no_robots() 88 88 * 89 * @param array $robots Associative array of robots directives.90 * @return array Filtered robots directives.89 * @param array<string, bool|string> $robots Associative array of robots directives. 90 * @return array<string, bool|string> Filtered robots directives. 91 91 */ 92 92 function wp_robots_noindex_embeds( array $robots ) { … … 113 113 * @see wp_robots_no_robots() 114 114 * 115 * @param array $robots Associative array of robots directives.116 * @return array Filtered robots directives.115 * @param array<string, bool|string> $robots Associative array of robots directives. 116 * @return array<string, bool|string> Filtered robots directives. 117 117 */ 118 118 function wp_robots_noindex_search( array $robots ) { … … 135 135 * @since 5.7.0 136 136 * 137 * @param array $robots Associative array of robots directives. 138 * @return array Filtered robots directives. 137 * @param array<string, bool|string> $robots Associative array of robots directives. 138 * @return array<string, bool|string> Filtered robots directives. 139 * 140 * @phpstan-return array{ noindex: true, ...<string, bool|string> } 139 141 */ 140 142 function wp_robots_no_robots( array $robots ) { … … 162 164 * @since 5.7.0 163 165 * 164 * @param array $robots Associative array of robots directives. 165 * @return array Filtered robots directives. 166 * @param array<string, bool|string> $robots Associative array of robots directives. 167 * @return array<string, bool|string> Filtered robots directives. 168 * 169 * @phpstan-return array{ noindex: true, noarchive: true, ...<string, bool|string> } 166 170 */ 167 171 function wp_robots_sensitive_page( array $robots ) { … … 183 187 * @since 5.7.0 184 188 * 185 * @param array $robots Associative array of robots directives.186 * @return array Filtered robots directives.189 * @param array<string, bool|string> $robots Associative array of robots directives. 190 * @return array<string, bool|string> Filtered robots directives. 187 191 */ 188 192 function wp_robots_max_image_preview_large( array $robots ) { -
trunk/src/wp-includes/shortcodes.php
r65573 r65777 189 189 * @param string $content The content to check. 190 190 * @return string[] An array of registered shortcode names found in the content. 191 * 192 * @phpstan-return list<string> 191 193 */ 192 194 function get_shortcode_tags_in_content( $content ) { -
trunk/src/wp-includes/widgets.php
r64681 r65777 1718 1718 * @param array|string $args Values for input fields. 1719 1719 * @param array $inputs Override default display options. 1720 * 1721 * @phpstan-param array{ 1722 * number: int|string, 1723 * error?: string|false, 1724 * title?: string, 1725 * url?: string, 1726 * items?: int, 1727 * show_summary?: int, 1728 * show_author?: int, 1729 * show_date?: int, 1730 * } $args 1731 * @phpstan-param array{ 1732 * title?: bool|'hidden', 1733 * url?: bool|'hidden', 1734 * items?: bool|'hidden', 1735 * show_summary?: bool|'hidden', 1736 * show_author?: bool|'hidden', 1737 * show_date?: bool|'hidden', 1738 * } $inputs 1720 1739 */ 1721 1740 function wp_widget_rss_form( $args, $inputs = null ) { … … 1803 1822 * @param bool $check_feed Optional. Whether to check feed for errors. Default true. 1804 1823 * @return array 1824 * 1825 * @phpstan-return array{ 1826 * title: string, 1827 * url: string, 1828 * link: string, 1829 * items: int<1, 20>, 1830 * error: string|false, 1831 * show_summary: int, 1832 * show_author: int, 1833 * show_date: int, 1834 * } 1805 1835 */ 1806 1836 function wp_widget_rss_process( $widget_rss, $check_feed = true ) { -
trunk/tests/phpstan/baselines-strict/argument.type.neon
r65668 r65777 35 35 path: ../../../src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php 36 36 - 37 message: '#^Parameter \#1 \$wp_response of method WP_AI_Client_HTTP_Client\:\:create_psr_response\(\) expects array\<string, mixed\>, array given\.$#'38 identifier: argument.type39 count: 240 path: ../../../src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php41 -42 37 message: '#^Parameter \#2 \$value of method WordPress\\AiClientDependencies\\Psr\\Http\\Message\\MessageInterface\:\:withHeader\(\) expects array\<string\>\|string, mixed given\.$#' 43 38 identifier: argument.type
Note:
See TracChangeset
for help on using the changeset viewer.