diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 655bb9bbc807c..0af28d696b2af 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -23,7 +23,6 @@ includes: # and the list between the markers. Do not edit that list by hand. # phpstan:baselines start - tests/phpstan/baselines/argument.type.neon - - tests/phpstan/baselines/argument.unresolvableType.neon - tests/phpstan/baselines/assign.propertyType.neon - tests/phpstan/baselines/binaryOp.invalid.neon - tests/phpstan/baselines/booleanAnd.alwaysFalse.neon diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 5806d879f1c5e..e186de3c5ce1c 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -4707,10 +4707,11 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array( * * @see get_posts() * - * @param array $args Optional. Arguments to retrieve posts. Default empty array. - * @param string $output Optional. The required return type. One of OBJECT or ARRAY_A, which - * correspond to a WP_Post object or an associative array, respectively. - * Default ARRAY_A. + * @param array|int $args Optional. Arguments to retrieve posts. Passing an integer number + * of posts is deprecated since 3.1.0. Default empty array. + * @param string $output Optional. The required return type. One of OBJECT or ARRAY_A, which + * correspond to a WP_Post object or an associative array, respectively. + * Default ARRAY_A. * @return array|false Array of recent posts, where the type of each element is determined * by the `$output` parameter. Empty array on failure. * diff --git a/tests/phpstan/baselines/argument.unresolvableType.neon b/tests/phpstan/baselines/argument.unresolvableType.neon deleted file mode 100644 index 3e8cdcb76c85d..0000000000000 --- a/tests/phpstan/baselines/argument.unresolvableType.neon +++ /dev/null @@ -1,25 +0,0 @@ -# PHPStan baseline for the `argument.unresolvableType` errors in WordPress core. -# -# https://phpstan.org/error-identifiers/argument.unresolvableType -# -# Each entry is scoped to a single file and carries an exact occurrence count, -# so that a new instance is reported as a new error rather than being absorbed -# silently. Fixing an occurrence therefore means decrementing or removing its -# entry here as part of the same change. -# -# The goal is to empty this file and delete it, along with the `includes` entry -# for it in phpstan.neon.dist. -# -# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with -# -# composer phpstan:baselines -- --identifier=argument.unresolvableType -# -# which reruns the analysis with this file suppressed so the errors surface again. - -parameters: - ignoreErrors: - - - message: '#^Parameter \#1 \$maybeint of function absint contains unresolvable type\.$#' - identifier: argument.unresolvableType - count: 1 - path: ../../../src/wp-includes/post.php