Skip to content

Commit 586a65c

Browse files
committed
Update baselines
1 parent a7a8002 commit 586a65c

5 files changed

Lines changed: 1 addition & 97 deletions

File tree

tests/phpstan/baseline/level-2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@
364364
$ignoreErrors[] = [
365365
'message' => '#^Access to an undefined property WP_Theme\\:\\:\\$version\\.$#',
366366
'identifier' => 'property.notFound',
367-
'count' => 6,
367+
'count' => 5,
368368
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-debug-data.php',
369369
];
370370
$ignoreErrors[] = [

tests/phpstan/baseline/level-3.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -55,36 +55,18 @@
5555
'count' => 1,
5656
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-themes-list-table.php',
5757
];
58-
$ignoreErrors[] = [
59-
'message' => '#^Function WP_Filesystem\\(\\) should return bool\\|null but empty return statement found\\.$#',
60-
'identifier' => 'return.empty',
61-
'count' => 1,
62-
'path' => __DIR__ . '/../../../src/wp-admin/includes/file.php',
63-
];
6458
$ignoreErrors[] = [
6559
'message' => '#^Function wp_get_nav_menu_to_edit\\(\\) should return string\\|WP_Error\\|null but returns WP_Term\\|false\\.$#',
6660
'identifier' => 'return.type',
6761
'count' => 1,
6862
'path' => __DIR__ . '/../../../src/wp-admin/includes/nav-menu.php',
6963
];
70-
$ignoreErrors[] = [
71-
'message' => '#^Function delete_plugins\\(\\) should return bool\\|WP_Error\\|null but empty return statement found\\.$#',
72-
'identifier' => 'return.empty',
73-
'count' => 2,
74-
'path' => __DIR__ . '/../../../src/wp-admin/includes/plugin.php',
75-
];
7664
$ignoreErrors[] = [
7765
'message' => '#^Function convert_to_screen\\(\\) should return WP_Screen but returns object\\{id\\: string, base\\: string\\}&stdClass\\.$#',
7866
'identifier' => 'return.type',
7967
'count' => 1,
8068
'path' => __DIR__ . '/../../../src/wp-admin/includes/template.php',
8169
];
82-
$ignoreErrors[] = [
83-
'message' => '#^Function delete_theme\\(\\) should return bool\\|WP_Error\\|null but empty return statement found\\.$#',
84-
'identifier' => 'return.empty',
85-
'count' => 2,
86-
'path' => __DIR__ . '/../../../src/wp-admin/includes/theme.php',
87-
];
8870
$ignoreErrors[] = [
8971
'message' => '#^Cannot access offset \'new_version\' on bool\\.$#',
9072
'identifier' => 'offsetAccess.nonOffsetAccessible',
@@ -115,12 +97,6 @@
11597
'count' => 1,
11698
'path' => __DIR__ . '/../../../src/wp-includes/blocks.php',
11799
];
118-
$ignoreErrors[] = [
119-
'message' => '#^Function get_category_by_path\\(\\) should return array\\|WP_Error\\|WP_Term\\|null but empty return statement found\\.$#',
120-
'identifier' => 'return.empty',
121-
'count' => 1,
122-
'path' => __DIR__ . '/../../../src/wp-includes/category.php',
123-
];
124100
$ignoreErrors[] = [
125101
'message' => '#^Parameter \\#3 \\$args \\(stdClass\\) of method Walker_Nav_Menu\\:\\:end_lvl\\(\\) should be compatible with parameter \\$args \\(array\\) of method Walker\\:\\:end_lvl\\(\\)$#',
126102
'identifier' => 'method.childParameterType',
@@ -271,12 +247,6 @@
271247
'count' => 1,
272248
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-post-type.php',
273249
];
274-
$ignoreErrors[] = [
275-
'message' => '#^Method WP_Query\\:\\:setup_postdata\\(\\) should return true but empty return statement found\\.$#',
276-
'identifier' => 'return.empty',
277-
'count' => 2,
278-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
279-
];
280250
$ignoreErrors[] = [
281251
'message' => '#^Property WP_Query\\:\\:\\$date_query \\(WP_Date_Query\\) does not accept default value of type false\\.$#',
282252
'identifier' => 'property.defaultValue',
@@ -637,12 +607,6 @@
637607
'count' => 1,
638608
'path' => __DIR__ . '/../../../src/wp-includes/taxonomy.php',
639609
];
640-
$ignoreErrors[] = [
641-
'message' => '#^Function _remove_theme_support\\(\\) should return bool but empty return statement found\\.$#',
642-
'identifier' => 'return.empty',
643-
'count' => 1,
644-
'path' => __DIR__ . '/../../../src/wp-includes/theme.php',
645-
];
646610
$ignoreErrors[] = [
647611
'message' => '#^Function _wp_get_current_user\\(\\) should return WP_User but returns array\\|float\\|int\\|string\\|false\\|null\\.$#',
648612
'identifier' => 'return.type',

tests/phpstan/baseline/level-4.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,6 @@
115115
'count' => 1,
116116
'path' => __DIR__ . '/../../../src/wp-admin/includes/file.php',
117117
];
118-
$ignoreErrors[] = [
119-
'message' => '#^Function WP_Filesystem\\(\\) never returns null so it can be removed from the return type\\.$#',
120-
'identifier' => 'return.unusedType',
121-
'count' => 1,
122-
'path' => __DIR__ . '/../../../src/wp-admin/includes/file.php',
123-
];
124118
$ignoreErrors[] = [
125119
'message' => '#^Negated boolean expression is always true\\.$#',
126120
'identifier' => 'booleanNot.alwaysTrue',
@@ -157,12 +151,6 @@
157151
'count' => 1,
158152
'path' => __DIR__ . '/../../../src/wp-admin/includes/plugin.php',
159153
];
160-
$ignoreErrors[] = [
161-
'message' => '#^Function delete_plugins\\(\\) never returns null so it can be removed from the return type\\.$#',
162-
'identifier' => 'return.unusedType',
163-
'count' => 1,
164-
'path' => __DIR__ . '/../../../src/wp-admin/includes/plugin.php',
165-
];
166154
$ignoreErrors[] = [
167155
'message' => '#^Property WP_Taxonomy\\:\\:\\$meta_box_sanitize_cb \\(callable\\) in isset\\(\\) is not nullable\\.$#',
168156
'identifier' => 'isset.property',
@@ -175,12 +163,6 @@
175163
'count' => 1,
176164
'path' => __DIR__ . '/../../../src/wp-admin/includes/schema.php',
177165
];
178-
$ignoreErrors[] = [
179-
'message' => '#^Function delete_theme\\(\\) never returns null so it can be removed from the return type\\.$#',
180-
'identifier' => 'return.unusedType',
181-
'count' => 1,
182-
'path' => __DIR__ . '/../../../src/wp-admin/includes/theme.php',
183-
];
184166
$ignoreErrors[] = [
185167
'message' => '#^Negated boolean expression is always false\\.$#',
186168
'identifier' => 'booleanNot.alwaysFalse',

tests/phpstan/baseline/level-5.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,6 @@
235235
'count' => 1,
236236
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-filesystem-ftpext.php',
237237
];
238-
$ignoreErrors[] = [
239-
'message' => '#^Parameter \\#2 \\$callback of function uasort expects callable\\(WP_Theme, WP_Theme\\)\\: int, array\\{\\$this\\(WP_MS_Themes_List_Table\\), \'_order_callback\'\\} given\\.$#',
240-
'identifier' => 'argument.type',
241-
'count' => 1,
242-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
243-
];
244238
$ignoreErrors[] = [
245239
'message' => '#^Parameter \\#1 \\$text of function esc_attr expects string, int given\\.$#',
246240
'identifier' => 'argument.type',

tests/phpstan/baseline/level-6.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,18 +2851,6 @@
28512851
'count' => 1,
28522852
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
28532853
];
2854-
$ignoreErrors[] = [
2855-
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:_order_callback\\(\\) has parameter \\$theme_a with no value type specified in iterable type array\\.$#',
2856-
'identifier' => 'missingType.iterableValue',
2857-
'count' => 1,
2858-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
2859-
];
2860-
$ignoreErrors[] = [
2861-
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:_order_callback\\(\\) has parameter \\$theme_b with no value type specified in iterable type array\\.$#',
2862-
'identifier' => 'missingType.iterableValue',
2863-
'count' => 1,
2864-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
2865-
];
28662854
$ignoreErrors[] = [
28672855
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:column_autoupdates\\(\\) has no return type specified\\.$#',
28682856
'identifier' => 'missingType.return',
@@ -2899,30 +2887,6 @@
28992887
'count' => 1,
29002888
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
29012889
];
2902-
$ignoreErrors[] = [
2903-
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:get_bulk_actions\\(\\) return type has no value type specified in iterable type array\\.$#',
2904-
'identifier' => 'missingType.iterableValue',
2905-
'count' => 1,
2906-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
2907-
];
2908-
$ignoreErrors[] = [
2909-
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:get_sortable_columns\\(\\) return type has no value type specified in iterable type array\\.$#',
2910-
'identifier' => 'missingType.iterableValue',
2911-
'count' => 1,
2912-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
2913-
];
2914-
$ignoreErrors[] = [
2915-
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:get_table_classes\\(\\) return type has no value type specified in iterable type array\\.$#',
2916-
'identifier' => 'missingType.iterableValue',
2917-
'count' => 1,
2918-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
2919-
];
2920-
$ignoreErrors[] = [
2921-
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:get_views\\(\\) return type has no value type specified in iterable type array\\.$#',
2922-
'identifier' => 'missingType.iterableValue',
2923-
'count' => 1,
2924-
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php',
2925-
];
29262890
$ignoreErrors[] = [
29272891
'message' => '#^Method WP_MS_Themes_List_Table\\:\\:no_items\\(\\) has no return type specified\\.$#',
29282892
'identifier' => 'missingType.return',

0 commit comments

Comments
 (0)