diff --git a/src/wp-includes/class-wp-scripts.php b/src/wp-includes/class-wp-scripts.php index 2a74bff8f65d9..cab06bae95971 100644 --- a/src/wp-includes/class-wp-scripts.php +++ b/src/wp-includes/class-wp-scripts.php @@ -1156,6 +1156,7 @@ private function get_highest_fetchpriority_with_dependents( string $handle, arra $fetchpriority = 'auto'; } + /** @var string[] $priorities */ static $priorities = array( 'low', 'auto', diff --git a/src/wp-includes/class-wp-tax-query.php b/src/wp-includes/class-wp-tax-query.php index e10915251365c..0d3a84f62ff3b 100644 --- a/src/wp-includes/class-wp-tax-query.php +++ b/src/wp-includes/class-wp-tax-query.php @@ -371,6 +371,7 @@ protected function get_sql_for_query( &$query, $depth = 0 ) { * * @param array $clause Query clause (passed by reference). * @param array $parent_query Parent query array. + * @param-out array|WP_Error $clause * @return array { * Array containing JOIN and WHERE SQL clauses to append to a first-order query. * @@ -539,6 +540,7 @@ protected function find_compatible_table_alias( $clause, $parent_query ) { * @since 3.2.0 * * @param array $query The single query. Passed by reference. + * @param-out array|WP_Error $query */ private function clean_query( &$query ) { if ( empty( $query['taxonomy'] ) ) { @@ -589,6 +591,7 @@ private function clean_query( &$query ) { * @param array $query The single query. Passed by reference. * @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id', * or 'term_id'. Default 'term_id'. + * @param-out array|WP_Error $query */ public function transform_query( &$query, $resulting_field ) { if ( empty( $query['terms'] ) ) { diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 6d42c97836dea..1a2fd43bc153f 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -6697,9 +6697,9 @@ function get_page_hierarchy( &$pages, $page_id = 0 ) { * * @see _page_traverse_name() * - * @param int $page_id Page ID. - * @param array $children Parent-children relations (passed by reference). - * @param string[] $result Array of page names keyed by ID (passed by reference). + * @param int $page_id Page ID. + * @param WP_Post[][] $children Parent-children relations (passed by reference). + * @param string[] $result Array of page names keyed by ID (passed by reference). */ function _page_traverse_name( $page_id, &$children, &$result ) { if ( isset( $children[ $page_id ] ) ) { diff --git a/tests/phpstan/baselines/parameterByRef.type.neon b/tests/phpstan/baselines/parameterByRef.type.neon index 0c1fffe95ebb9..b27f25a3184ff 100644 --- a/tests/phpstan/baselines/parameterByRef.type.neon +++ b/tests/phpstan/baselines/parameterByRef.type.neon @@ -18,28 +18,8 @@ parameters: ignoreErrors: - - - message: '#^Parameter &\$stored_results by\-ref type of method WP_Scripts\:\:get_highest_fetchpriority_with_dependents\(\) expects array\, array\ given\.$#' - identifier: parameterByRef.type - count: 1 - path: ../../../src/wp-includes/class-wp-scripts.php - - - message: '#^Parameter &\$query by\-ref type of method WP_Tax_Query\:\:clean_query\(\) expects array, WP_Error given\.$#' - identifier: parameterByRef.type - count: 2 - path: ../../../src/wp-includes/class-wp-tax-query.php - - - message: '#^Parameter &\$query by\-ref type of method WP_Tax_Query\:\:transform_query\(\) expects array, WP_Error given\.$#' - identifier: parameterByRef.type - count: 1 - path: ../../../src/wp-includes/class-wp-tax-query.php - message: '#^Parameter &\$matched_token_byte_length by\-ref type of method WP_Token_Map\:\:read_token\(\) expects int\|null, \(float\|int\) given\.$#' identifier: parameterByRef.type count: 1 path: ../../../src/wp-includes/class-wp-token-map.php - - - message: '#^Parameter &\$result by\-ref type of function _page_traverse_name\(\) expects array\, array given\.$#' - identifier: parameterByRef.type - count: 1 - path: ../../../src/wp-includes/post.php