Changeset 63426
- Timestamp:
- 09/01/2026 06:26:20 PM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 15 edited
-
phpstan.neon.dist (modified) (1 diff)
-
src/wp-admin/includes/class-wp-posts-list-table.php (modified) (1 diff)
-
src/wp-admin/users.php (modified) (1 diff)
-
src/wp-includes/block-supports/states.php (modified) (1 diff)
-
src/wp-includes/class-wp-block-type.php (modified) (1 diff)
-
src/wp-includes/class-wp-comment.php (modified) (2 diffs)
-
src/wp-includes/class-wp-theme-json.php (modified) (1 diff)
-
src/wp-includes/class-wp-view-config-data.php (modified) (1 diff)
-
src/wp-includes/taxonomy.php (modified) (1 diff)
-
tests/phpstan/baselines/argument.type.neon (modified) (16 diffs)
-
tests/phpstan/baselines/assign.propertyType.neon (modified) (1 diff)
-
tests/phpstan/baselines/isset.property.neon (modified) (2 diffs)
-
tests/phpstan/baselines/notIdentical.alwaysTrue.neon (modified) (1 diff)
-
tests/phpstan/baselines/return.type.neon (modified) (2 diffs)
-
tests/phpstan/baselines/variable.undefined.neon (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpstan.neon.dist
r63384 r63426 125 125 path: src/wp-includes/compat.php 126 126 reportUnmatched: false 127 128 # Level 5: 129 # substr_compare()'s $length has always accepted null, meaning "compare the full length". PHP 7.4 spelled 130 # that `int $length = null`, where the null default makes the parameter implicitly nullable, and PHP 8.0 131 # only made it explicit as `?int $length = null`. The behavior never differed: verified on PHP 7.4 that 132 # passing null compares the whole string rather than coercing to a length of 0. 133 # 134 # PHPStan reads the two spellings from two sources and only one is right. Its PHP 8 stub carries `?int`, 135 # but the pre-8.0 `resources/functionMap.php` records the type as plain `int`, having dropped the implicit 136 # nullability when it was transcribed from the old manual. Because `phpVersion.min` is 70400, the legacy 137 # map wins and null is reported as invalid. 138 # 139 # This lives here rather than in a baseline because a baseline entry records work still to be done, and 140 # there is none: the call is correct on every version WordPress supports, and the fault is in PHPStan's 141 # data. Passing an explicit length purely to satisfy it would change working code to suit a tooling bug. 142 # `reportUnmatched: false` so this entry lapses quietly if PHPStan corrects the map. 143 - 144 message: '#^Parameter \#4 \$length of function substr_compare expects int, null given\.$#' 145 path: src/wp-includes/html-api/class-wp-html-tag-processor.php 146 reportUnmatched: false -
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r62868 r63426 1136 1136 */ 1137 1137 protected function get_primary_column_aria_label( $item ) { 1138 return isset( $item->post_title ) &&! empty( $item->post_title ) ? $item->post_title : __( 'no title' );1138 return ! empty( $item->post_title ) ? $item->post_title : __( 'no title' ); 1139 1139 } 1140 1140 -
trunk/src/wp-admin/users.php
r62688 r63426 340 340 <ul> 341 341 <?php 342 /** 343 * @global wpdb $wpdb WordPress database abstraction object. 344 */ 345 global $wpdb; 346 342 347 $go_delete = 0; 343 348 $users_have_content = false; -
trunk/src/wp-includes/block-supports/states.php
r62720 r63426 400 400 function wp_get_block_state_style_rules( $state_styles, $block_type, $rules_group = null ) { 401 401 $css_rules = array(); 402 $block_selectors = is set( $block_type->selectors ) && is_array( $block_type->selectors )402 $block_selectors = is_array( $block_type->selectors ) 403 403 ? $block_type->selectors 404 404 : array(); -
trunk/src/wp-includes/class-wp-block-type.php
r63320 r63426 358 358 * 359 359 * @param string $name Deprecated property name. 360 * @return string|string[]|null The value read from the new property if the first item in the array provided, 361 * null when value not found or when unknown property name provided. 360 * @return string|string[]|array[]|null The value read from the new property if the first item in the array 361 * provided, the variations or uses context arrays for those two names, 362 * null when value not found or when unknown property name provided. 362 363 */ 363 364 public function __get( $name ) { -
trunk/src/wp-includes/class-wp-comment.php
r63354 r63426 64 64 * Comment ID. 65 65 * 66 * A numeric string, for compatibility reasons. 67 * 68 * @since 4.4.0 69 * @var string 70 * @phpstan-var numeric-string 66 * A numeric string, for compatibility reasons. Note that {@see get_comment_to_edit()} 67 * replaces it with an integer in place. 68 * 69 * @since 4.4.0 70 * @var string|int 71 * @phpstan-var numeric-string|int 71 72 */ 72 73 public $comment_ID; … … 75 76 * ID of the post the comment is associated with. 76 77 * 77 * A numeric string, for compatibility reasons. 78 * 79 * @since 4.4.0 80 * @var string 81 * @phpstan-var numeric-string 78 * A numeric string, for compatibility reasons. Note that {@see get_comment_to_edit()} 79 * replaces it with an integer in place. 80 * 81 * @since 4.4.0 82 * @var string|int 83 * @phpstan-var numeric-string|int 82 84 */ 83 85 public $comment_post_ID = '0'; -
trunk/src/wp-includes/class-wp-theme-json.php
r63384 r63426 5673 5673 * @since 6.3.0 5674 5674 * 5675 * @param object $metadata The related block metadata containing selectors. 5676 * @param object $node A merged theme.json node for block or variation. 5675 * @param array $metadata The related block metadata containing selectors. 5676 * @param array $node A merged theme.json node for block or variation. Features 5677 * promoted to their own selector are removed from it. 5677 5678 * @return array The style declarations for the node's features with custom 5678 5679 * selectors. -
trunk/src/wp-includes/class-wp-view-config-data.php
r62973 r63426 524 524 // merge() and replace() alike. An empty array is shape-ambiguous and 525 525 // exempt, so replace() with an empty list can still clear a list. 526 if ( array() !== $incoming && is_array( $current ) && ! array_is_list( $current ) && array() !== $current) {526 if ( array() !== $incoming && is_array( $current ) && ! array_is_list( $current ) ) { 527 527 _doing_it_wrong( 528 528 __METHOD__, -
trunk/src/wp-includes/taxonomy.php
r63420 r63426 1599 1599 * $term is null ? null : ( 1600 1600 * $term is 0 ? 0 : ( 1601 * $taxonomy is '' ? int|null : (1601 * $taxonomy is '' ? numeric-string|null : ( 1602 1602 * array{ 1603 1603 * term_id: numeric-string, -
trunk/tests/phpstan/baselines/argument.type.neon
r63420 r63426 30 30 path: ../../../src/wp-admin/admin-header.php 31 31 - 32 message: '#^Parameter \#1 \$position of function wp_comment_reply expects int, string given\.$#' 33 identifier: argument.type 34 count: 1 35 path: ../../../src/wp-admin/edit-comments.php 36 - 37 message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#' 38 identifier: argument.type 39 count: 2 40 path: ../../../src/wp-admin/edit-form-advanced.php 41 - 42 message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#' 43 identifier: argument.type 44 count: 1 45 path: ../../../src/wp-admin/edit-form-comment.php 46 - 47 message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#' 48 identifier: argument.type 49 count: 2 50 path: ../../../src/wp-admin/edit-link-form.php 51 - 52 message: '#^Parameter \#3 \$name of function submit_button expects string, null given\.$#' 53 identifier: argument.type 54 count: 1 55 path: ../../../src/wp-admin/edit-tag-form.php 56 - 32 57 message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#' 33 58 identifier: argument.type 34 59 count: 1 35 path: ../../../src/wp-admin/comment.php36 -37 message: '#^Parameter \#1 \$post of function get_post_status expects int\|WP_Post\|null, string given\.$#'38 identifier: argument.type39 count: 140 path: ../../../src/wp-admin/comment.php41 -42 message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#'43 identifier: argument.type44 count: 245 path: ../../../src/wp-admin/comment.php46 -47 message: '#^Parameter \#1 \$position of function wp_comment_reply expects int, string given\.$#'48 identifier: argument.type49 count: 150 path: ../../../src/wp-admin/edit-comments.php51 -52 message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#'53 identifier: argument.type54 count: 255 path: ../../../src/wp-admin/edit-form-advanced.php56 -57 message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#'58 identifier: argument.type59 count: 160 path: ../../../src/wp-admin/edit-form-comment.php61 -62 message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#'63 identifier: argument.type64 count: 265 path: ../../../src/wp-admin/edit-form-comment.php66 -67 message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#'68 identifier: argument.type69 count: 170 path: ../../../src/wp-admin/edit-form-comment.php71 -72 message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#'73 identifier: argument.type74 count: 275 path: ../../../src/wp-admin/edit-link-form.php76 -77 message: '#^Parameter \#3 \$name of function submit_button expects string, null given\.$#'78 identifier: argument.type79 count: 180 path: ../../../src/wp-admin/edit-tag-form.php81 -82 message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#'83 identifier: argument.type84 count: 185 60 path: ../../../src/wp-admin/edit.php 86 61 - … … 95 70 path: ../../../src/wp-admin/includes/ajax-actions.php 96 71 - 97 message: '#^Parameter \# 1 \$comment_id of function _wp_ajax_delete_comment_responseexpects int, string given\.$#'98 identifier: argument.type 99 count: 272 message: '#^Parameter \#2 \$compare_from of function wp_get_revision_ui_diff expects int, string given\.$#' 73 identifier: argument.type 74 count: 1 100 75 path: ../../../src/wp-admin/includes/ajax-actions.php 101 76 - 102 message: '#^Parameter \# 2 \$compare_fromof function wp_get_revision_ui_diff expects int, string given\.$#'77 message: '#^Parameter \#3 \$compare_to of function wp_get_revision_ui_diff expects int, string given\.$#' 103 78 identifier: argument.type 104 79 count: 1 105 80 path: ../../../src/wp-admin/includes/ajax-actions.php 106 81 - 107 message: '#^Parameter \#3 \$compare_to of function wp_get_revision_ui_diff expects int, string given\.$#'108 identifier: argument.type109 count: 1110 path: ../../../src/wp-admin/includes/ajax-actions.php111 -112 82 message: '#^Parameter \#2 \$gmt of function current_time expects bool, int given\.$#' 113 83 identifier: argument.type … … 140 110 path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php 141 111 - 142 message: '#^Parameter \#1 \$post of function post_password_required expects int\|WP_Post\|null, string given\.$#'143 identifier: argument.type144 count: 1145 path: ../../../src/wp-admin/includes/class-wp-comments-list-table.php146 -147 message: '#^Parameter \#3 \$post of function get_comment_class expects int\|WP_Post\|null, string given\.$#'148 identifier: argument.type149 count: 1150 path: ../../../src/wp-admin/includes/class-wp-comments-list-table.php151 -152 112 message: '#^Parameter \#3 \$number of function _nx expects int, float given\.$#' 153 113 identifier: argument.type … … 179 139 count: 1 180 140 path: ../../../src/wp-admin/includes/class-wp-upgrader.php 181 -182 message: '#^Parameter \#1 \$post of function _draft_or_post_title expects int\|WP_Post, string given\.$#'183 identifier: argument.type184 count: 1185 path: ../../../src/wp-admin/includes/dashboard.php186 -187 message: '#^Parameter \#1 \$post of function get_the_permalink expects int\|WP_Post, string given\.$#'188 identifier: argument.type189 count: 1190 path: ../../../src/wp-admin/includes/dashboard.php191 -192 message: '#^Parameter \#1 \$post of function post_password_required expects int\|WP_Post\|null, string given\.$#'193 identifier: argument.type194 count: 1195 path: ../../../src/wp-admin/includes/dashboard.php196 141 - 197 142 message: '#^Parameter \#3 \$name of function submit_button expects string, false given\.$#' … … 480 425 path: ../../../src/wp-content/themes/twentyeleven/functions.php 481 426 - 482 message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#'483 identifier: argument.type484 count: 1485 path: ../../../src/wp-content/themes/twentyeleven/functions.php486 -487 427 message: '#^Parameter \#1 \$size of function next_image_link expects array\<int\>\|string, false given\.$#' 488 428 identifier: argument.type … … 620 560 path: ../../../src/wp-content/themes/twentyten/functions.php 621 561 - 622 message: '#^Parameter \#1 \$ comment of function get_comment_link expects int\|WP_Comment\|null, stringgiven\.$#'562 message: '#^Parameter \#1 \$wp_head_callback of function add_custom_image_header expects callable\(\)\: mixed, '''' given\.$#' 623 563 identifier: argument.type 624 564 count: 1 625 565 path: ../../../src/wp-content/themes/twentyten/functions.php 626 566 - 627 message: '#^Parameter \#1 \$wp_head_callback of function add_custom_image_header expects callable\(\)\: mixed, '''' given\.$#'628 identifier: argument.type629 count: 1630 path: ../../../src/wp-content/themes/twentyten/functions.php631 -632 567 message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' 633 568 identifier: argument.type … … 690 625 path: ../../../src/wp-content/themes/twentytwelve/functions.php 691 626 - 692 message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#'693 identifier: argument.type694 count: 1695 path: ../../../src/wp-content/themes/twentytwelve/functions.php696 -697 627 message: '#^Parameter \#1 \$size of function next_image_link expects array\<int\>\|string, false given\.$#' 698 628 identifier: argument.type … … 789 719 count: 1 790 720 path: ../../../src/wp-includes/class-wp-block-parser.php 791 -792 message: '#^Parameter \#1 \$child_id of method WP_Comment\:\:get_child\(\) expects int, string given\.$#'793 identifier: argument.type794 count: 1795 path: ../../../src/wp-includes/class-wp-comment-query.php796 -797 message: '#^Parameter \#1 \$ids of function _prime_post_caches expects array\<int\>, list\<string\> given\.$#'798 identifier: argument.type799 count: 1800 path: ../../../src/wp-includes/class-wp-comment-query.php801 721 - 802 722 message: '#^Parameter \#1 \$ajax_message of method WP_Customize_Manager\:\:wp_die\(\) expects string\|WP_Error, int given\.$#' … … 915 835 path: ../../../src/wp-includes/class-wp-site.php 916 836 - 917 message: '#^Parameter \#1 \$metadata of method WP_Theme_JSON\:\:get_feature_declarations_for_node\(\) expects object, array given\.$#'918 identifier: argument.type919 count: 4920 path: ../../../src/wp-includes/class-wp-theme-json.php921 -922 message: '#^Parameter \#1 \$node of method WP_Theme_JSON\:\:process_pseudo_selectors\(\) expects array, object given\.$#'923 identifier: argument.type924 count: 2925 path: ../../../src/wp-includes/class-wp-theme-json.php926 -927 message: '#^Parameter \#1 \$styles of static method WP_Theme_JSON\:\:compute_style_properties\(\) expects array, object given\.$#'928 identifier: argument.type929 count: 3930 path: ../../../src/wp-includes/class-wp-theme-json.php931 -932 837 message: '#^Parameter \#2 \$data of method WP_Theme\:\:cache_add\(\) expects array\|string, int given\.$#' 933 838 identifier: argument.type … … 950 855 path: ../../../src/wp-includes/class-wp-widget.php 951 856 - 952 message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, stringgiven\.$#'857 message: '#^Parameter \#1 \$postarr of function wp_insert_post expects array\{ID\?\: int, post_author\?\: int, post_date\?\: string, post_date_gmt\?\: string, post_content\?\: string, post_content_filtered\?\: string, post_title\?\: string, post_excerpt\?\: string, \.\.\., \.\.\.\}, array\{post_author\: int, post_date\: int\|string, post_date_gmt\: int\|string, post_content\: string, post_title\: string, post_category\: array\<string\>\|string, post_status\: ''draft''\|''publish''\} given\.$#' 953 858 identifier: argument.type 954 859 count: 1 955 860 path: ../../../src/wp-includes/class-wp-xmlrpc-server.php 956 861 - 957 message: '#^Parameter \#1 \$ postarr of function wp_insert_post expects array\{ID\?\: int, post_author\?\: int, post_date\?\: string, post_date_gmt\?\: string, post_content\?\: string, post_content_filtered\?\: string, post_title\?\: string, post_excerpt\?\: string, \.\.\., \.\.\.\}, array\{post_author\: int, post_date\: int\|string, post_date_gmt\: int\|string, post_content\: string, post_title\: string, post_category\: array\<string\>\|string, post_status\: ''draft''\|''publish''\}given\.$#'862 message: '#^Parameter \#1 \$term_id of method wp_xmlrpc_server\:\:get_term_custom_fields\(\) expects int, string given\.$#' 958 863 identifier: argument.type 959 864 count: 1 960 865 path: ../../../src/wp-includes/class-wp-xmlrpc-server.php 961 866 - 962 message: '#^Parameter \#1 \$ term_id of method wp_xmlrpc_server\:\:get_term_custom_fields\(\)expects int, string given\.$#'867 message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' 963 868 identifier: argument.type 964 869 count: 1 … … 967 872 message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' 968 873 identifier: argument.type 969 count: 1970 path: ../../../src/wp-includes/c lass-wp-xmlrpc-server.php874 count: 2 875 path: ../../../src/wp-includes/comment-template.php 971 876 - 972 877 message: '#^Parameter \#1 \$comment_id of function get_page_of_comment expects int, string given\.$#' 973 878 identifier: argument.type 974 879 count: 1 975 path: ../../../src/wp-includes/comment-template.php 976 - 977 message: '#^Parameter \#1 \$post of function get_permalink expects int\|WP_Post, string given\.$#' 978 identifier: argument.type 979 count: 1 980 path: ../../../src/wp-includes/comment-template.php 981 - 982 message: '#^Parameter \#1 \$post of function post_password_required expects int\|WP_Post\|null, string given\.$#' 983 identifier: argument.type 984 count: 1 985 path: ../../../src/wp-includes/comment-template.php 880 path: ../../../src/wp-includes/comment.php 881 - 882 message: '#^Parameter \#1 \$comments of function update_comment_cache expects array\<WP_Comment\>, list\<stdClass\>\|null given\.$#' 883 identifier: argument.type 884 count: 1 885 path: ../../../src/wp-includes/comment.php 886 - 887 message: '#^Parameter \#1 \$content of function pingback expects string, null given\.$#' 888 identifier: argument.type 889 count: 1 890 path: ../../../src/wp-includes/comment.php 891 - 892 message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' 893 identifier: argument.type 894 count: 1 895 path: ../../../src/wp-includes/comment.php 896 - 897 message: '#^Parameter \#1 \$gmt_time of function spawn_cron expects int, float given\.$#' 898 identifier: argument.type 899 count: 1 900 path: ../../../src/wp-includes/cron.php 901 - 902 message: '#^Parameter \#1 \$container_context of method WP_Customize_Partial\:\:render\(\) expects array, null given\.$#' 903 identifier: argument.type 904 count: 1 905 path: ../../../src/wp-includes/customize/class-wp-customize-selective-refresh.php 906 - 907 message: '#^Parameter \#1 \$response of method WP_REST_Server\:\:response_to_data\(\) expects WP_REST_Response, WP_HTTP_Response given\.$#' 908 identifier: argument.type 909 count: 1 910 path: ../../../src/wp-includes/embed.php 986 911 - 987 912 message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' 988 913 identifier: argument.type 989 count: 2990 path: ../../../src/wp-includes/comment-template.php991 -992 message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#'993 identifier: argument.type994 count: 1995 path: ../../../src/wp-includes/comment.php996 -997 message: '#^Parameter \#1 \$comment_id of function add_comment_meta expects int, string given\.$#'998 identifier: argument.type999 count: 51000 path: ../../../src/wp-includes/comment.php1001 -1002 message: '#^Parameter \#1 \$comment_id of function delete_comment_meta expects int, string given\.$#'1003 identifier: argument.type1004 count: 81005 path: ../../../src/wp-includes/comment.php1006 -1007 message: '#^Parameter \#1 \$comment_id of function get_comment_text expects int\|WP_Comment, string given\.$#'1008 identifier: argument.type1009 count: 11010 path: ../../../src/wp-includes/comment.php1011 -1012 message: '#^Parameter \#1 \$comment_id of function get_page_of_comment expects int, string given\.$#'1013 identifier: argument.type1014 count: 11015 path: ../../../src/wp-includes/comment.php1016 -1017 message: '#^Parameter \#1 \$comments of function update_comment_cache expects array\<WP_Comment\>, list\<stdClass\>\|null given\.$#'1018 identifier: argument.type1019 count: 11020 path: ../../../src/wp-includes/comment.php1021 -1022 message: '#^Parameter \#1 \$content of function pingback expects string, null given\.$#'1023 identifier: argument.type1024 count: 11025 path: ../../../src/wp-includes/comment.php1026 -1027 message: '#^Parameter \#1 \$ids of function clean_comment_cache expects array\|int, string given\.$#'1028 identifier: argument.type1029 count: 21030 path: ../../../src/wp-includes/comment.php1031 -1032 message: '#^Parameter \#1 \$post_id of function wp_update_comment_count expects int\|null, string given\.$#'1033 identifier: argument.type1034 count: 21035 path: ../../../src/wp-includes/comment.php1036 -1037 message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#'1038 identifier: argument.type1039 count: 11040 path: ../../../src/wp-includes/comment.php1041 -1042 message: '#^Parameter \#2 \$object_ids of function update_meta_cache expects array\<int\>\|string, list\<string\> given\.$#'1043 identifier: argument.type1044 count: 11045 path: ../../../src/wp-includes/comment.php1046 -1047 message: '#^Parameter \#1 \$gmt_time of function spawn_cron expects int, float given\.$#'1048 identifier: argument.type1049 count: 11050 path: ../../../src/wp-includes/cron.php1051 -1052 message: '#^Parameter \#1 \$container_context of method WP_Customize_Partial\:\:render\(\) expects array, null given\.$#'1053 identifier: argument.type1054 count: 11055 path: ../../../src/wp-includes/customize/class-wp-customize-selective-refresh.php1056 -1057 message: '#^Parameter \#1 \$response of method WP_REST_Server\:\:response_to_data\(\) expects WP_REST_Response, WP_HTTP_Response given\.$#'1058 identifier: argument.type1059 914 count: 1 1060 915 path: ../../../src/wp-includes/embed.php 1061 916 - 1062 message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#'1063 identifier: argument.type1064 count: 11065 path: ../../../src/wp-includes/embed.php1066 -1067 917 message: '#^Parameter \#1 \$post_id of function get_post_comments_feed_link expects int, string given\.$#' 1068 918 identifier: argument.type … … 1074 924 count: 1 1075 925 path: ../../../src/wp-includes/feed-rss2.php 1076 -1077 message: '#^Parameter \#1 \$post of function get_the_guid expects int\|WP_Post, string given\.$#'1078 identifier: argument.type1079 count: 11080 path: ../../../src/wp-includes/feed.php1081 926 - 1082 927 message: '#^Parameter \#2 \$message of class WP_Error constructor expects string, list\<string\> given\.$#' … … 1170 1015 path: ../../../src/wp-includes/html-api/class-wp-html-processor.php 1171 1016 - 1172 message: '#^Parameter \#4 \$length of function substr_compare expects int, null given\.$#'1173 identifier: argument.type1174 count: 11175 path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php1176 -1177 1017 message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' 1178 1018 identifier: argument.type … … 1275 1115 path: ../../../src/wp-includes/pluggable.php 1276 1116 - 1277 message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#'1278 identifier: argument.type1279 count: 11280 path: ../../../src/wp-includes/pluggable.php1281 -1282 message: '#^Parameter \#1 \$post of function get_permalink expects int\|WP_Post, string given\.$#'1283 identifier: argument.type1284 count: 41285 path: ../../../src/wp-includes/pluggable.php1286 -1287 1117 message: '#^Parameter \#1 \$user of function user_can expects int\|WP_User, string given\.$#' 1288 1118 identifier: argument.type … … 1420 1250 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php 1421 1251 - 1422 message: '#^Parameter \#1 \$comment_id of function get_comment_type expects int\|WP_Comment, string given\.$#'1423 identifier: argument.type1424 count: 21425 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php1426 -1427 message: '#^Parameter \#1 \$comment_id of function wp_delete_comment expects int\|WP_Comment, string given\.$#'1428 identifier: argument.type1429 count: 11430 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php1431 -1432 message: '#^Parameter \#1 \$comment_id of function wp_trash_comment expects int\|WP_Comment, string given\.$#'1433 identifier: argument.type1434 count: 11435 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php1436 -1437 message: '#^Parameter \#1 \$object_id of method WP_REST_Meta_Fields\:\:get_value\(\) expects int, string given\.$#'1438 identifier: argument.type1439 count: 11440 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php1441 -1442 message: '#^Parameter \#2 \$comment_id of method WP_REST_Comments_Controller\:\:handle_status_param\(\) expects int, string given\.$#'1443 identifier: argument.type1444 count: 21445 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php1446 -1447 message: '#^Parameter \#2 \$object_id of method WP_REST_Meta_Fields\:\:update_value\(\) expects int, string given\.$#'1448 identifier: argument.type1449 count: 11450 path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php1451 -1452 1252 message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' 1453 1253 identifier: argument.type … … 1624 1424 count: 1 1625 1425 path: ../../../src/wp-includes/widgets.php 1626 -1627 message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#'1628 identifier: argument.type1629 count: 11630 path: ../../../src/wp-includes/widgets/class-wp-widget-recent-comments.php -
trunk/tests/phpstan/baselines/assign.propertyType.neon
r63420 r63426 19 19 parameters: 20 20 ignoreErrors: 21 -22 message: '#^Property WP_Comment\:\:\$comment_ID \(numeric\-string\) does not accept int\.$#'23 identifier: assign.propertyType24 count: 125 path: ../../../src/wp-admin/includes/comment.php26 -27 message: '#^Property WP_Comment\:\:\$comment_post_ID \(numeric\-string\) does not accept int\.$#'28 identifier: assign.propertyType29 count: 130 path: ../../../src/wp-admin/includes/comment.php31 21 - 32 22 message: '#^Property WP_Block_Template\:\:\$author \(int\|null\) does not accept string\.$#' -
trunk/tests/phpstan/baselines/isset.property.neon
r63023 r63426 30 30 path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php 31 31 - 32 message: '#^Property WP_Post\:\:\$post_title \(string\) in isset\(\) is not nullable\.$#'33 identifier: isset.property34 count: 135 path: ../../../src/wp-admin/includes/class-wp-posts-list-table.php36 -37 32 message: '#^Property WP_Screen\:\:\$post_type \(string\) in isset\(\) is not nullable\.$#' 38 33 identifier: isset.property … … 89 84 count: 1 90 85 path: ../../../src/wp-includes/block-editor.php 91 -92 message: '#^Property WP_Block_Type\:\:\$selectors \(array\) in isset\(\) is not nullable\.$#'93 identifier: isset.property94 count: 195 path: ../../../src/wp-includes/block-supports/states.php96 86 - 97 87 message: '#^Property WP_Customize_Control\:\:\$settings \(array\) in isset\(\) is not nullable\.$#' -
trunk/tests/phpstan/baselines/notIdentical.alwaysTrue.neon
r63301 r63426 30 30 path: ../../../src/wp-includes/class-wp-rewrite.php 31 31 - 32 message: '#^Strict comparison using \!\=\= between array\{\} and non\-empty\-array\<mixed, mixed\> will always evaluate to true\.$#'33 identifier: notIdentical.alwaysTrue34 count: 135 path: ../../../src/wp-includes/class-wp-view-config-data.php36 -37 32 message: '#^Strict comparison using \!\=\= between ''Etc'' and ''Africa''\|''America''\|''Antarctica''\|''Arctic''\|''Asia''\|''Atlantic''\|''Australia''\|''Europe''\|''Indian''\|''Pacific'' will always evaluate to true\.$#' 38 33 identifier: notIdentical.alwaysTrue -
trunk/tests/phpstan/baselines/return.type.neon
r63360 r63426 49 49 count: 1 50 50 path: ../../../src/wp-includes/class-wp-block-processor.php 51 -52 message: '#^Method WP_Block_Type\:\:__get\(\) should return array\<string\>\|string\|null but returns array\<array\>\.$#'53 identifier: return.type54 count: 155 path: ../../../src/wp-includes/class-wp-block-type.php56 51 - 57 52 message: '#^Method WP_Image_Editor_Imagick\:\:set_imagick_time_limit\(\) should return int\|null but returns float\.$#' … … 150 145 path: ../../../src/wp-includes/revision.php 151 146 - 152 message: '#^Function term_exists\(\) should return array\{term_id\: numeric\-string, term_taxonomy_id\: numeric\-string\}\|int\|null but returns string\.$#'153 identifier: return.type154 count: 1155 path: ../../../src/wp-includes/taxonomy.php156 -157 147 message: '#^Function _wp_get_current_user\(\) should return WP_User but returns null\.$#' 158 148 identifier: return.type -
trunk/tests/phpstan/baselines/variable.undefined.neon
r63019 r63426 585 585 path: ../../../src/wp-admin/users.php 586 586 - 587 message: '#^Variable \$wpdb might not be defined\.$#'588 identifier: variable.undefined589 count: 6590 path: ../../../src/wp-admin/users.php591 -592 587 message: '#^Variable \$title might not be defined\.$#' 593 588 identifier: variable.undefined
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)