Skip to content

Commit

Permalink
chore: regenerate baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Dec 28, 2024
1 parent bdf378e commit d0684a0
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 293 deletions.
42 changes: 0 additions & 42 deletions tools/phpstan/baseline/level-0.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
<?php declare(strict_types = 1);

$ignoreErrors = [];
$ignoreErrors[] = [
// identifier: arguments.count
'message' => '#^Callback expects 1 parameter, \\$accepted_args is set to 2\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/block-supports/block-style-variations.php',
];
$ignoreErrors[] = [
// identifier: return.missing
'message' => '#^Function gutenberg_tinycolor_string_to_rgb\\(\\) should return array but return statement is missing\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/block-supports/duotone.php',
];
$ignoreErrors[] = [
// identifier: return.missing
'message' => '#^Method WP_Duotone_Gutenberg\\:\\:get_selector\\(\\) should return string but return statement is missing\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/class-wp-duotone-gutenberg.php',
];
$ignoreErrors[] = [
// identifier: return.missing
'message' => '#^Method WP_Theme_JSON_Gutenberg\\:\\:should_override_preset\\(\\) should return bool but return statement is missing\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/class-wp-theme-json-gutenberg.php',
];
$ignoreErrors[] = [
// identifier: phpDoc.parseError
'message' => '#^One or more @param tags has an invalid name or invalid syntax\\.$#',
Expand All @@ -37,29 +19,5 @@
'count' => 1,
'path' => __DIR__ . '/../../../lib/client-assets.php',
];
$ignoreErrors[] = [
// identifier: new.static
'message' => '#^Unsafe usage of new static\\(\\)\\.$#',
'count' => 2,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/class-gutenberg-token-map-6-6.php',
];
$ignoreErrors[] = [
// identifier: return.missing
'message' => '#^Method Gutenberg_REST_Templates_Controller_6_7\\:\\:get_wp_templates_author_text_field\\(\\) should return string but return statement is missing\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/class-gutenberg-rest-templates-controller-6-7.php',
];
$ignoreErrors[] = [
// identifier: arguments.count
'message' => '#^Callback expects 1 parameter, \\$accepted_args is set to 2\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/experimental/kses-allowed-html.php',
];
$ignoreErrors[] = [
// identifier: arguments.count
'message' => '#^Callback expects 1 parameter, \\$accepted_args is set to 2\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/rest-api.php',
];

return ['parameters' => ['ignoreErrors' => $ignoreErrors]];
36 changes: 6 additions & 30 deletions tools/phpstan/baseline/level-2.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,12 @@
'count' => 1,
'path' => __DIR__ . '/../../../lib/class-wp-theme-json-resolver-gutenberg.php',
];
$ignoreErrors[] = [
// identifier: parameter.notFound
'message' => '#^PHPDoc tag @param references unknown parameter\\: \\$source_args$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/block-bindings/pattern-overrides.php',
];
$ignoreErrors[] = [
// identifier: parameter.notFound
'message' => '#^PHPDoc tag @param references unknown parameter\\: \\$settings$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/block-bindings.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property WP_Block_Template\\:\\:\\$plugin\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/class-gutenberg-rest-templates-controller-6-7.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property WP_Token_Map\\:\\:\\$groups\\.$#',
Expand Down Expand Up @@ -163,18 +151,6 @@
'count' => 2,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/class-gutenberg-token-map-6-7.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property WP_Block_Template\\:\\:\\$plugin\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/class-wp-block-templates-registry.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property WP_Block_Template\\:\\:\\$plugin\\.$#',
'count' => 5,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/compat.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property object\\:\\:\\$slug\\.$#',
Expand All @@ -193,18 +169,18 @@
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/compat.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property WP_Block_Template\\:\\:\\$plugin\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/rest-api.php',
];
$ignoreErrors[] = [
// identifier: method.notFound
'message' => '#^Call to an undefined method object\\:\\:set\\(\\)\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.8/block-comments.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property object\\:\\:\\$ID\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.8/class-gutenberg-hierarchical-sort.php',
];
$ignoreErrors[] = [
// identifier: property.notFound
'message' => '#^Access to an undefined property WP_Post\\:\\:\\$content\\.$#',
Expand Down
36 changes: 0 additions & 36 deletions tools/phpstan/baseline/level-3.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
'count' => 1,
'path' => __DIR__ . '/../../../lib/blocks.php',
];
$ignoreErrors[] = [
// identifier: return.type
'message' => '#^Method WP_Duotone_Gutenberg\\:\\:get_selector\\(\\) should return string but returns null\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/class-wp-duotone-gutenberg.php',
];
$ignoreErrors[] = [
// identifier: method.childParameterType
'message' => '#^Parameter \\#1 \\$id \\(int\\) of method WP_REST_Global_Styles_Controller_Gutenberg\\:\\:prepare_links\\(\\) should be compatible with parameter \\$post \\(WP_Post\\) of method WP_REST_Posts_Controller\\:\\:prepare_links\\(\\)$#',
Expand Down Expand Up @@ -79,36 +73,6 @@
'count' => 1,
'path' => __DIR__ . '/../../../lib/class-wp-theme-json-resolver-gutenberg.php',
];
$ignoreErrors[] = [
// identifier: return.type
'message' => '#^Function _gutenberg_get_block_templates_files\\(\\) should return array but returns null\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/block-template-utils.php',
];
$ignoreErrors[] = [
// identifier: return.type
'message' => '#^Function gutenberg_replace_pattern_override_default_binding\\(\\) should return string but returns array\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/blocks.php',
];
$ignoreErrors[] = [
// identifier: return.type
'message' => '#^Method Gutenberg_Token_Map_6_6\\:\\:from_array\\(\\) should return WP_Token_Map\\|null but returns static\\(Gutenberg_Token_Map_6_6\\)\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/class-gutenberg-token-map-6-6.php',
];
$ignoreErrors[] = [
// identifier: return.type
'message' => '#^Method Gutenberg_Token_Map_6_6\\:\\:from_precomputed_table\\(\\) should return WP_Token_Map but returns null\\.$#',
'count' => 2,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/class-gutenberg-token-map-6-6.php',
];
$ignoreErrors[] = [
// identifier: return.type
'message' => '#^Method Gutenberg_Token_Map_6_6\\:\\:from_precomputed_table\\(\\) should return WP_Token_Map but returns static\\(Gutenberg_Token_Map_6_6\\)\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/class-gutenberg-token-map-6-6.php',
];
$ignoreErrors[] = [
// identifier: offsetAssign.dimType
'message' => '#^Cannot assign offset \'_fields\' to WP_REST_Request\\<array\\>\\.$#',
Expand Down
18 changes: 9 additions & 9 deletions tools/phpstan/baseline/level-4.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@
'path' => __DIR__ . '/../../../lib/class-wp-theme-json-gutenberg.php',
];
$ignoreErrors[] = [
// identifier: booleanAnd.leftAlwaysTrue
'message' => '#^Left side of && is always true\\.$#',
// identifier: booleanNot.alwaysTrue
'message' => '#^Negated boolean expression is always true\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/block-template-utils.php',
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/class-wp-block-templates-registry.php',
];
$ignoreErrors[] = [
// identifier: nullCoalesce.property
'message' => '#^Property WP_Post_Type\\:\\:\\$template \\(array\\<array\\>\\) on left side of \\?\\? is not nullable\\.$#',
// identifier: empty.offset
'message' => '#^Offset \'rendered\' on array\\{raw\\: mixed\\} in empty\\(\\) does not exist\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/rest-api.php',
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.8/blocks.php',
];
$ignoreErrors[] = [
// identifier: booleanNot.alwaysTrue
'message' => '#^Negated boolean expression is always true\\.$#',
// identifier: deadCode.unreachable
'message' => '#^Unreachable statement \\- code above always terminates\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.7/class-wp-block-templates-registry.php',
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.8/blocks.php',
];
$ignoreErrors[] = [
// identifier: return.unusedType
Expand Down
6 changes: 0 additions & 6 deletions tools/phpstan/baseline/level-5.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
'count' => 2,
'path' => __DIR__ . '/../../../lib/client-assets.php',
];
$ignoreErrors[] = [
// identifier: argument.type
'message' => '#^Parameter \\#1 \\$str of function strtoupper expects string, bool given\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../../lib/compat/wordpress-6.6/class-gutenberg-token-map-6-6.php',
];
$ignoreErrors[] = [
// identifier: argument.type
'message' => '#^Parameter \\#2 \\$value of method WP_HTTP_Response\\:\\:header\\(\\) expects string, int given\\.$#',
Expand Down
Loading

0 comments on commit d0684a0

Please sign in to comment.