Skip to content

Commit e4cbd2f

Browse files
committed
phpstan: regenerate baselines
1 parent f050820 commit e4cbd2f

3 files changed

Lines changed: 21 additions & 351 deletions

File tree

tests/phpstan/baseline/level-1.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php declare(strict_types = 1);
22

33
$ignoreErrors = [];
4+
$ignoreErrors[] = [
5+
'message' => '#^Variable \\$_POST in isset\\(\\) always exists and is not nullable\\.$#',
6+
'identifier' => 'isset.variable',
7+
'count' => 1,
8+
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-custom-image-header.php',
9+
];
410
$ignoreErrors[] = [
511
'message' => '#^Constructor of class WP_Filesystem_Direct has an unused parameter \\$arg\\.$#',
612
'identifier' => 'constructor.unusedParameter',
@@ -14,10 +20,10 @@
1420
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-posts-list-table.php',
1521
];
1622
$ignoreErrors[] = [
17-
'message' => '#^Variable \\$connection_type in empty\\(\\) always exists and is not falsy\\.$#',
18-
'identifier' => 'empty.variable',
23+
'message' => '#^Variable \\$_POST in isset\\(\\) always exists and is not nullable\\.$#',
24+
'identifier' => 'isset.variable',
1925
'count' => 1,
20-
'path' => __DIR__ . '/../../../src/wp-admin/includes/file.php',
26+
'path' => __DIR__ . '/../../../src/wp-admin/includes/media.php',
2127
];
2228
$ignoreErrors[] = [
2329
'message' => '#^Variable \\$parent_file in empty\\(\\) always exists and is not falsy\\.$#',
@@ -31,12 +37,24 @@
3137
'count' => 1,
3238
'path' => __DIR__ . '/../../../src/wp-includes/canonical.php',
3339
];
40+
$ignoreErrors[] = [
41+
'message' => '#^Variable \\$namespace in isset\\(\\) always exists and is not nullable\\.$#',
42+
'identifier' => 'isset.variable',
43+
'count' => 1,
44+
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-block-parser.php',
45+
];
3446
$ignoreErrors[] = [
3547
'message' => '#^Variable \\$block_type in empty\\(\\) always exists and is not falsy\\.$#',
3648
'identifier' => 'empty.variable',
3749
'count' => 1,
3850
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-block-supports.php',
3951
];
52+
$ignoreErrors[] = [
53+
'message' => '#^Variable \\$loader in isset\\(\\) always exists and is not nullable\\.$#',
54+
'identifier' => 'isset.variable',
55+
'count' => 1,
56+
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-oembed.php',
57+
];
4058
$ignoreErrors[] = [
4159
'message' => '#^Variable \\$q in isset\\(\\) is never defined\\.$#',
4260
'identifier' => 'isset.variable',

tests/phpstan/baseline/level-3.php

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@
7979
'count' => 1,
8080
'path' => __DIR__ . '/../../../src/wp-admin/includes/misc.php',
8181
];
82-
$ignoreErrors[] = [
83-
'message' => '#^Function save_mod_rewrite_rules\\(\\) should return bool\\|null but empty return statement found\\.$#',
84-
'identifier' => 'return.empty',
85-
'count' => 1,
86-
'path' => __DIR__ . '/../../../src/wp-admin/includes/misc.php',
87-
];
8882
$ignoreErrors[] = [
8983
'message' => '#^Function delete_plugins\\(\\) should return bool\\|WP_Error\\|null but empty return statement found\\.$#',
9084
'identifier' => 'return.empty',
@@ -271,12 +265,6 @@
271265
'count' => 1,
272266
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-customize-setting.php',
273267
];
274-
$ignoreErrors[] = [
275-
'message' => '#^Property WP_Dependencies\\:\\:\\$all_queued_deps \\(array\\) does not accept null\\.$#',
276-
'identifier' => 'assign.propertyType',
277-
'count' => 2,
278-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-dependencies.php',
279-
];
280268
$ignoreErrors[] = [
281269
'message' => '#^WpOrg\\\\Requests\\\\Cookie\\\\Jar does not accept WpOrg\\\\Requests\\\\Cookie\\.$#',
282270
'identifier' => 'offsetAssign.valueType',
@@ -325,12 +313,6 @@
325313
'count' => 1,
326314
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
327315
];
328-
$ignoreErrors[] = [
329-
'message' => '#^Property WP_Query\\:\\:\\$queried_object_id \\(int\\) does not accept null\\.$#',
330-
'identifier' => 'assign.propertyType',
331-
'count' => 1,
332-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
333-
];
334316
$ignoreErrors[] = [
335317
'message' => '#^Property WP_Rewrite\\:\\:\\$rules \\(array\\<string\\>\\) does not accept string\\.$#',
336318
'identifier' => 'assign.propertyType',
@@ -415,60 +397,6 @@
415397
'count' => 1,
416398
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme-json-resolver.php',
417399
];
418-
$ignoreErrors[] = [
419-
'message' => '#^Property WP_Theme\\:\\:\\$block_template_folders \\(array\\<string\\>\\) does not accept null\\.$#',
420-
'identifier' => 'assign.propertyType',
421-
'count' => 1,
422-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
423-
];
424-
$ignoreErrors[] = [
425-
'message' => '#^Property WP_Theme\\:\\:\\$block_theme \\(bool\\) does not accept null\\.$#',
426-
'identifier' => 'assign.propertyType',
427-
'count' => 1,
428-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
429-
];
430-
$ignoreErrors[] = [
431-
'message' => '#^Property WP_Theme\\:\\:\\$errors \\(WP_Error\\) does not accept null\\.$#',
432-
'identifier' => 'assign.propertyType',
433-
'count' => 1,
434-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
435-
];
436-
$ignoreErrors[] = [
437-
'message' => '#^Property WP_Theme\\:\\:\\$headers_sanitized \\(array\\) does not accept null\\.$#',
438-
'identifier' => 'assign.propertyType',
439-
'count' => 1,
440-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
441-
];
442-
$ignoreErrors[] = [
443-
'message' => '#^Property WP_Theme\\:\\:\\$name_translated \\(string\\) does not accept null\\.$#',
444-
'identifier' => 'assign.propertyType',
445-
'count' => 1,
446-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
447-
];
448-
$ignoreErrors[] = [
449-
'message' => '#^Property WP_Theme\\:\\:\\$parent \\(WP_Theme\\) does not accept null\\.$#',
450-
'identifier' => 'assign.propertyType',
451-
'count' => 2,
452-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
453-
];
454-
$ignoreErrors[] = [
455-
'message' => '#^Property WP_Theme\\:\\:\\$template \\(string\\) does not accept null\\.$#',
456-
'identifier' => 'assign.propertyType',
457-
'count' => 1,
458-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
459-
];
460-
$ignoreErrors[] = [
461-
'message' => '#^Property WP_Theme\\:\\:\\$textdomain_loaded \\(bool\\) does not accept null\\.$#',
462-
'identifier' => 'assign.propertyType',
463-
'count' => 1,
464-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
465-
];
466-
$ignoreErrors[] = [
467-
'message' => '#^Property WP_Theme\\:\\:\\$theme_root_uri \\(string\\) does not accept null\\.$#',
468-
'identifier' => 'assign.propertyType',
469-
'count' => 1,
470-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme.php',
471-
];
472400
$ignoreErrors[] = [
473401
'message' => '#^Static property WP_Theme\\:\\:\\$cache_expiration \\(bool\\) does not accept default value of type int\\.$#',
474402
'identifier' => 'property.defaultValue',
@@ -523,18 +451,6 @@
523451
'count' => 1,
524452
'path' => __DIR__ . '/../../../src/wp-includes/class-wpdb.php',
525453
];
526-
$ignoreErrors[] = [
527-
'message' => '#^Function get_comment_reply_link\\(\\) should return string\\|false\\|null but empty return statement found\\.$#',
528-
'identifier' => 'return.empty',
529-
'count' => 2,
530-
'path' => __DIR__ . '/../../../src/wp-includes/comment-template.php',
531-
];
532-
$ignoreErrors[] = [
533-
'message' => '#^Function get_page_of_comment\\(\\) should return int\\|null but empty return statement found\\.$#',
534-
'identifier' => 'return.empty',
535-
'count' => 1,
536-
'path' => __DIR__ . '/../../../src/wp-includes/comment.php',
537-
];
538454
$ignoreErrors[] = [
539455
'message' => '#^PHPDoc type array of property WP_Customize_Nav_Menu_Item_Setting\\:\\:\\$default is not covariant with PHPDoc type string of overridden property WP_Customize_Setting\\:\\:\\$default\\.$#',
540456
'identifier' => 'property.phpDocType',
@@ -613,36 +529,12 @@
613529
'count' => 1,
614530
'path' => __DIR__ . '/../../../src/wp-includes/l10n/class-wp-translation-file.php',
615531
];
616-
$ignoreErrors[] = [
617-
'message' => '#^Function get_edit_post_link\\(\\) should return string\\|null but empty return statement found\\.$#',
618-
'identifier' => 'return.empty',
619-
'count' => 3,
620-
'path' => __DIR__ . '/../../../src/wp-includes/link-template.php',
621-
];
622-
$ignoreErrors[] = [
623-
'message' => '#^Function get_edit_term_link\\(\\) should return string\\|null but empty return statement found\\.$#',
624-
'identifier' => 'return.empty',
625-
'count' => 2,
626-
'path' => __DIR__ . '/../../../src/wp-includes/link-template.php',
627-
];
628-
$ignoreErrors[] = [
629-
'message' => '#^Function get_preview_post_link\\(\\) should return string\\|null but empty return statement found\\.$#',
630-
'identifier' => 'return.empty',
631-
'count' => 1,
632-
'path' => __DIR__ . '/../../../src/wp-includes/link-template.php',
633-
];
634532
$ignoreErrors[] = [
635533
'message' => '#^Function update_meta_cache\\(\\) should return array\\|false but returns bool\\.$#',
636534
'identifier' => 'return.type',
637535
'count' => 1,
638536
'path' => __DIR__ . '/../../../src/wp-includes/meta.php',
639537
];
640-
$ignoreErrors[] = [
641-
'message' => '#^Function wp_set_all_user_settings\\(\\) should return bool\\|null but empty return statement found\\.$#',
642-
'identifier' => 'return.empty',
643-
'count' => 1,
644-
'path' => __DIR__ . '/../../../src/wp-includes/option.php',
645-
];
646538
$ignoreErrors[] = [
647539
'message' => '#^Function wp_post_revision_title\\(\\) should return string\\|false but returns null\\.$#',
648540
'identifier' => 'return.type',
@@ -655,12 +547,6 @@
655547
'count' => 1,
656548
'path' => __DIR__ . '/../../../src/wp-includes/post-template.php',
657549
];
658-
$ignoreErrors[] = [
659-
'message' => '#^Function get_page_by_path\\(\\) should return array\\<int\\|string, mixed\\>\\|WP_Post\\|null but empty return statement found\\.$#',
660-
'identifier' => 'return.empty',
661-
'count' => 1,
662-
'path' => __DIR__ . '/../../../src/wp-includes/post.php',
663-
];
664550
$ignoreErrors[] = [
665551
'message' => '#^Function wp_set_post_categories\\(\\) should return array\\|WP_Error\\|false but returns true\\.$#',
666552
'identifier' => 'return.type',

0 commit comments

Comments
 (0)