Skip to content

Commit edabf22

Browse files
committed
phpstan: regenerate baselines
1 parent 775f05f commit edabf22

7 files changed

Lines changed: 179 additions & 1193 deletions

File tree

tests/phpstan/baseline/level-0.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
'count' => 2,
7474
'path' => __DIR__ . '/../../../src/wp-includes/customize/class-wp-customize-header-image-setting.php',
7575
];
76+
$ignoreErrors[] = [
77+
'message' => '#^Unsafe usage of new static\\(\\)\\.$#',
78+
'identifier' => 'new.static',
79+
'count' => 2,
80+
'path' => __DIR__ . '/../../../src/wp-includes/html-api/class-wp-html-processor.php',
81+
];
7682
$ignoreErrors[] = [
7783
'message' => '#^Class GdImage not found\\.$#',
7884
'identifier' => 'class.notFound',

tests/phpstan/baseline/level-1.php

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

33
$ignoreErrors = [];
4-
$ignoreErrors[] = [
5-
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$comment_author\\.$#',
6-
'identifier' => 'variable.undefined',
7-
'count' => 1,
8-
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
9-
];
10-
$ignoreErrors[] = [
11-
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$comment_author_email\\.$#',
12-
'identifier' => 'variable.undefined',
13-
'count' => 1,
14-
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
15-
];
16-
$ignoreErrors[] = [
17-
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$comment_author_url\\.$#',
18-
'identifier' => 'variable.undefined',
19-
'count' => 1,
20-
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
21-
];
22-
$ignoreErrors[] = [
23-
'message' => '#^Call to function compact\\(\\) contains possibly undefined variable \\$user_id\\.$#',
24-
'identifier' => 'variable.undefined',
25-
'count' => 1,
26-
'path' => __DIR__ . '/../../../src/wp-admin/includes/ajax-actions.php',
27-
];
284
$ignoreErrors[] = [
295
'message' => '#^Variable \\$_POST in isset\\(\\) always exists and is not nullable\\.$#',
306
'identifier' => 'isset.variable',
@@ -91,24 +67,12 @@
9167
'count' => 1,
9268
'path' => __DIR__ . '/../../../src/wp-includes/class-wp-query.php',
9369
];
94-
$ignoreErrors[] = [
95-
'message' => '#^Variable \\$modes_str in empty\\(\\) always exists and is not falsy\\.$#',
96-
'identifier' => 'empty.variable',
97-
'count' => 1,
98-
'path' => __DIR__ . '/../../../src/wp-includes/class-wpdb.php',
99-
];
10070
$ignoreErrors[] = [
10171
'message' => '#^Variable \\$deprecated in empty\\(\\) always exists and is always falsy\\.$#',
10272
'identifier' => 'empty.variable',
10373
'count' => 1,
10474
'path' => __DIR__ . '/../../../src/wp-includes/pluggable.php',
10575
];
106-
$ignoreErrors[] = [
107-
'message' => '#^Variable \\$schema in empty\\(\\) is never defined\\.$#',
108-
'identifier' => 'empty.variable',
109-
'count' => 1,
110-
'path' => __DIR__ . '/../../../src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php',
111-
];
11276
$ignoreErrors[] = [
11377
'message' => '#^Variable \\$the_parent in empty\\(\\) always exists and is not falsy\\.$#',
11478
'identifier' => 'empty.variable',
@@ -121,11 +85,5 @@
12185
'count' => 1,
12286
'path' => __DIR__ . '/../../../src/wp-includes/template.php',
12387
];
124-
$ignoreErrors[] = [
125-
'message' => '#^Variable \\$old_user_data in empty\\(\\) always exists and is not falsy\\.$#',
126-
'identifier' => 'empty.variable',
127-
'count' => 1,
128-
'path' => __DIR__ . '/../../../src/wp-includes/user.php',
129-
];
13088

13189
return ['parameters' => ['ignoreErrors' => $ignoreErrors]];

0 commit comments

Comments
 (0)