Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/wp-includes/meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,8 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
* @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
* 'user', or any other object type with an associated meta table.
* @param string|int[] $object_ids Array or comma delimited list of object IDs to update cache for.
* @return array|false Metadata cache for the specified objects, or false on failure.
* @return array<int, array<string|int, string[]>>|bool Metadata cache for the specified objects, false on failure,
* or a boolean if the update was short-circuited by the filter.
*/
function update_meta_cache( $meta_type, $object_ids ) {
global $wpdb;
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/ms-site.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ function update_site_cache( $sites, $update_meta_cache = true ) {
* @since 5.1.0
*
* @param array $site_ids List of site IDs.
* @return array|false An array of metadata on success, false if there is nothing to update.
* @return array<int, array<string|int, string[]>>|bool An array of metadata on success, false if there is nothing to update,
* or a boolean if the update was short-circuited by the filter.
*/
function update_sitemeta_cache( $site_ids ) {
// Ensure this filter is hooked in even if the function is called early.
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -8353,7 +8353,8 @@ function update_post_parent_caches( $posts ) {
* @since 2.1.0
*
* @param int[] $post_ids Array of post IDs.
* @return array|false An array of metadata on success, false if there is nothing to update.
* @return array<int, array<string|int, string[]>>|bool An array of metadata on success, false if there is nothing to update,
* or a boolean if the update was short-circuited by the filter.
*/
function update_postmeta_cache( $post_ids ) {
return update_meta_cache( 'post', $post_ids );
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,8 @@ function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' )
* @since 4.4.0
*
* @param array $term_ids List of term IDs.
* @return array|false An array of metadata on success, false if there is nothing to update.
* @return array<int, array<string|int, string[]>>|bool An array of metadata on success, false if there is nothing to update,
* or a boolean if the update was short-circuited by the filter.
*/
function update_termmeta_cache( $term_ids ) {
return update_meta_cache( 'term', $term_ids );
Expand Down
5 changes: 0 additions & 5 deletions tests/phpstan/baselines/return.type.neon
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ parameters:
identifier: return.type
count: 1
path: ../../../src/wp-includes/fonts.php
-
message: '#^Function update_meta_cache\(\) should return array\|false but returns bool\.$#'
identifier: return.type
count: 1
path: ../../../src/wp-includes/meta.php
-
message: '#^Function wp_post_revision_title\(\) should return string\|false but returns null\.$#'
identifier: return.type
Expand Down
Loading