Skip to content

Commit 5f43db2

Browse files
committed
chore: regenerate PHPStan baselines
1 parent fe5882a commit 5f43db2

File tree

7 files changed

+1323
-1485
lines changed

7 files changed

+1323
-1485
lines changed

tests/phpstan/baseline/level-0.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,74 @@
22

33
$ignoreErrors = [];
44
$ignoreErrors[] = [
5-
// identifier: return.missing
65
'message' => '#^Method WP_Filesystem_SSH2\\:\\:touch\\(\\) should return bool but return statement is missing\\.$#',
6+
'identifier' => 'return.missing',
77
'count' => 1,
88
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-filesystem-ssh2.php',
99
];
1010
$ignoreErrors[] = [
11-
// identifier: function.notFound
1211
'message' => '#^Function get_file not found\\.$#',
12+
'identifier' => 'function.notFound',
1313
'count' => 1,
1414
'path' => __DIR__ . '/../../../src/wp-admin/load-scripts.php',
1515
];
1616
$ignoreErrors[] = [
17-
// identifier: function.notFound
1817
'message' => '#^Function get_file not found\\.$#',
18+
'identifier' => 'function.notFound',
1919
'count' => 1,
2020
'path' => __DIR__ . '/../../../src/wp-admin/load-styles.php',
2121
];
2222
$ignoreErrors[] = [
23-
// identifier: class.notFound
2423
'message' => '#^Instantiated class WP_Press_This_Plugin not found\\.$#',
24+
'identifier' => 'class.notFound',
25+
'count' => 1,
26+
'path' => __DIR__ . '/../../../src/wp-admin/press-this.php',
27+
];
28+
$ignoreErrors[] = [
29+
'message' => '#^Path in include\\(\\) "/press\\-this/class\\-wp\\-press\\-this\\-plugin\\.php" is not a file or it does not exist\\.$#',
30+
'identifier' => 'include.fileNotFound',
2531
'count' => 1,
2632
'path' => __DIR__ . '/../../../src/wp-admin/press-this.php',
2733
];
2834
$ignoreErrors[] = [
29-
// identifier: return.missing
3035
'message' => '#^Method WP_Theme_JSON\\:\\:should_override_preset\\(\\) should return bool but return statement is missing\\.$#',
36+
'identifier' => 'return.missing',
3137
'count' => 1,
3238
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-theme-json.php',
3339
];
3440
$ignoreErrors[] = [
35-
// identifier: return.missing
3641
'message' => '#^Method WP_Customize_Background_Image_Setting\\:\\:update\\(\\) should return bool but return statement is missing\\.$#',
42+
'identifier' => 'return.missing',
3743
'count' => 1,
3844
'path' => __DIR__ . '/../../../src/wp-includes/customize/class-wp-customize-background-image-setting.php',
3945
];
4046
$ignoreErrors[] = [
41-
// identifier: return.missing
4247
'message' => '#^Method WP_Customize_Filter_Setting\\:\\:update\\(\\) should return bool but return statement is missing\\.$#',
48+
'identifier' => 'return.missing',
4349
'count' => 1,
4450
'path' => __DIR__ . '/../../../src/wp-includes/customize/class-wp-customize-filter-setting.php',
4551
];
4652
$ignoreErrors[] = [
47-
// identifier: return.missing
4853
'message' => '#^Method WP_Customize_Header_Image_Setting\\:\\:update\\(\\) should return bool but return statement is missing\\.$#',
49-
'count' => 1,
54+
'identifier' => 'return.missing',
55+
'count' => 2,
5056
'path' => __DIR__ . '/../../../src/wp-includes/customize/class-wp-customize-header-image-setting.php',
5157
];
5258
$ignoreErrors[] = [
53-
// identifier: class.notFound
5459
'message' => '#^Class GdImage not found\\.$#',
60+
'identifier' => 'class.notFound',
5561
'count' => 1,
5662
'path' => __DIR__ . '/../../../src/wp-includes/media.php',
5763
];
5864
$ignoreErrors[] = [
59-
// identifier: new.static
6065
'message' => '#^Unsafe usage of new static\\(\\)\\.$#',
66+
'identifier' => 'new.static',
6167
'count' => 1,
6268
'path' => __DIR__ . '/../../../src/wp-includes/style-engine/class-wp-style-engine-css-rules-store.php',
6369
];
6470
$ignoreErrors[] = [
65-
// identifier: variable.undefined
6671
'message' => '#^Undefined variable\\: \\$s$#',
72+
'identifier' => 'variable.undefined',
6773
'count' => 1,
6874
'path' => __DIR__ . '/../../../src/wp-includes/template.php',
6975
];

tests/phpstan/baseline/level-1.php

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,146 +2,134 @@
22

33
$ignoreErrors = [];
44
$ignoreErrors[] = [
5-
// identifier: variable.undefined
65
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$comment_author\\.$#',
6+
'identifier' => 'variable.undefined',
77
'count' => 1,
88
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
99
];
1010
$ignoreErrors[] = [
11-
// identifier: variable.undefined
1211
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$comment_author_email\\.$#',
12+
'identifier' => 'variable.undefined',
1313
'count' => 1,
1414
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
1515
];
1616
$ignoreErrors[] = [
17-
// identifier: variable.undefined
1817
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$comment_author_url\\.$#',
18+
'identifier' => 'variable.undefined',
1919
'count' => 1,
2020
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
2121
];
2222
$ignoreErrors[] = [
23-
// identifier: variable.undefined
2423
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$user_id\\.$#',
24+
'identifier' => 'variable.undefined',
2525
'count' => 1,
2626
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
2727
];
2828
$ignoreErrors[] = [
29-
// identifier: isset.variable
3029
'message' => '#^Variable \\$_POST in isset\\(\\) always exists and is not nullable\\.$#',
30+
'identifier' => 'isset.variable',
3131
'count' => 1,
3232
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-custom-image-header.php',
3333
];
3434
$ignoreErrors[] = [
35-
// identifier: constructor.unusedParameter
3635
'message' => '#^Constructor of class WP_Filesystem_Direct has an unused parameter \\$arg\\.$#',
36+
'identifier' => 'constructor.unusedParameter',
3737
'count' => 1,
3838
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-filesystem-direct.php',
3939
];
4040
$ignoreErrors[] = [
41-
// identifier: empty.variable
4241
'message' => '#^Variable \\$class in empty\\(\\) always exists and is always falsy\\.$#',
42+
'identifier' => 'empty.variable',
4343
'count' => 1,
4444
'path' => __DIR__ . '/../../../src/wp-admin/includes/class-wp-posts-list-table.php',
4545
];
4646
$ignoreErrors[] = [
47-
// identifier: isset.variable
4847
'message' => '#^Variable \\$_POST in isset\\(\\) always exists and is not nullable\\.$#',
48+
'identifier' => 'isset.variable',
4949
'count' => 1,
5050
'path' => __DIR__ . '/../../../src/wp-admin/includes/media.php',
5151
];
5252
$ignoreErrors[] = [
53-
// identifier: empty.variable
5453
'message' => '#^Variable \\$parent_file in empty\\(\\) always exists and is not falsy\\.$#',
54+
'identifier' => 'empty.variable',
5555
'count' => 1,
5656
'path' => __DIR__ . '/../../../src/wp-admin/themes.php',
5757
];
5858
$ignoreErrors[] = [
59-
// identifier: empty.variable
6059
'message' => '#^Variable \\$addl_path in empty\\(\\) always exists and is always falsy\\.$#',
60+
'identifier' => 'empty.variable',
6161
'count' => 1,
6262
'path' => __DIR__ . '/../../../src/wp-includes/canonical.php',
6363
];
6464
$ignoreErrors[] = [
65-
// identifier: isset.variable
6665
'message' => '#^Variable \\$namespace in isset\\(\\) always exists and is not nullable\\.$#',
66+
'identifier' => 'isset.variable',
6767
'count' => 1,
6868
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-block-parser.php',
6969
];
7070
$ignoreErrors[] = [
71-
// identifier: empty.variable
7271
'message' => '#^Variable \\$block_type in empty\\(\\) always exists and is not falsy\\.$#',
72+
'identifier' => 'empty.variable',
7373
'count' => 1,
7474
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-block-supports.php',
7575
];
7676
$ignoreErrors[] = [
77-
// identifier: constructor.unusedParameter
78-
'message' => '#^Constructor of class WP_Feed_Cache_Transient has an unused parameter \\$location\\.$#',
79-
'count' => 1,
80-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-feed-cache-transient.php',
81-
];
82-
$ignoreErrors[] = [
83-
// identifier: constructor.unusedParameter
84-
'message' => '#^Constructor of class WP_Feed_Cache_Transient has an unused parameter \\$type\\.$#',
85-
'count' => 1,
86-
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-feed-cache-transient.php',
87-
];
88-
$ignoreErrors[] = [
89-
// identifier: isset.variable
9077
'message' => '#^Variable \\$loader in isset\\(\\) always exists and is not nullable\\.$#',
78+
'identifier' => 'isset.variable',
9179
'count' => 1,
9280
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-oembed.php',
9381
];
9482
$ignoreErrors[] = [
95-
// identifier: isset.variable
9683
'message' => '#^Variable \\$q in isset\\(\\) is never defined\\.$#',
84+
'identifier' => 'isset.variable',
9785
'count' => 1,
9886
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
9987
];
10088
$ignoreErrors[] = [
101-
// identifier: empty.variable
10289
'message' => '#^Variable \\$search in empty\\(\\) always exists and is not falsy\\.$#',
90+
'identifier' => 'empty.variable',
10391
'count' => 1,
10492
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
10593
];
10694
$ignoreErrors[] = [
107-
// identifier: empty.variable
10895
'message' => '#^Variable \\$status_type_clauses in empty\\(\\) always exists and is not falsy\\.$#',
96+
'identifier' => 'empty.variable',
10997
'count' => 1,
11098
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
11199
];
112100
$ignoreErrors[] = [
113-
// identifier: empty.variable
114101
'message' => '#^Variable \\$modes_str in empty\\(\\) always exists and is not falsy\\.$#',
102+
'identifier' => 'empty.variable',
115103
'count' => 1,
116104
'path' => __DIR__ . '/../../../src/wp-includes/class-wpdb.php',
117105
];
118106
$ignoreErrors[] = [
119-
// identifier: isset.variable
120-
'message' => '#^Variable \\$user_already_exists in isset\\(\\) always exists and is not nullable\\.$#',
121-
'count' => 1,
122-
'path' => __DIR__ . '/../../../src/wp-includes/ms-functions.php',
123-
];
124-
$ignoreErrors[] = [
125-
// identifier: empty.variable
126107
'message' => '#^Variable \\$deprecated in empty\\(\\) always exists and is always falsy\\.$#',
108+
'identifier' => 'empty.variable',
127109
'count' => 1,
128110
'path' => __DIR__ . '/../../../src/wp-includes/pluggable.php',
129111
];
130112
$ignoreErrors[] = [
131-
// identifier: empty.variable
132113
'message' => '#^Variable \\$schema in empty\\(\\) is never defined\\.$#',
114+
'identifier' => 'empty.variable',
133115
'count' => 1,
134116
'path' => __DIR__ . '/../../../src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php',
135117
];
136118
$ignoreErrors[] = [
137-
// identifier: isset.variable
119+
'message' => '#^Variable \\$the_parent in empty\\(\\) always exists and is not falsy\\.$#',
120+
'identifier' => 'empty.variable',
121+
'count' => 1,
122+
'path' => __DIR__ . '/../../../src/wp-includes/taxonomy.php',
123+
];
124+
$ignoreErrors[] = [
138125
'message' => '#^Variable \\$s in isset\\(\\) is never defined\\.$#',
126+
'identifier' => 'isset.variable',
139127
'count' => 1,
140128
'path' => __DIR__ . '/../../../src/wp-includes/template.php',
141129
];
142130
$ignoreErrors[] = [
143-
// identifier: empty.variable
144131
'message' => '#^Variable \\$old_user_data in empty\\(\\) always exists and is not falsy\\.$#',
132+
'identifier' => 'empty.variable',
145133
'count' => 1,
146134
'path' => __DIR__ . '/../../../src/wp-includes/user.php',
147135
];

0 commit comments

Comments
 (0)