Docs: Improve @return tags for wp_cache_*_multiple() functions:

* `wp_cache_add_multiple()`
* `wp_cache_set_multiple()`
* `wp_cache_get_multiple()`
* `wp_cache_delete_multiple()`

This aims to provide more details about the returned value types.

Follow-up to [52700], [52702], [52703].

See #54729, #54574.

git-svn-id: https://develop.svn.wordpress.org/trunk@52708 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-02-11 19:19:57 +00:00
parent deafd1193c
commit d3851cd248
3 changed files with 23 additions and 12 deletions

View File

@@ -188,7 +188,8 @@ class WP_Object_Cache {
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param int $expire Optional. When to expire the cache contents, in seconds.
* Default 0 (no expiration).
* @return array Array of return values.
* @return bool[] Array of return values, grouped by key. Each value is either
* true on success, or false if cache key and group already exist.
*/
public function add_multiple( array $data, $group = '', $expire = 0 ) {
$values = array();
@@ -277,7 +278,7 @@ class WP_Object_Cache {
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param int $expire Optional. When to expire the cache contents, in seconds.
* Default 0 (no expiration).
* @return array Array of return values.
* @return bool[] Array of return values, grouped by key. Each value is always true.
*/
public function set_multiple( array $data, $group = '', $expire = 0 ) {
$values = array();
@@ -341,7 +342,8 @@ class WP_Object_Cache {
* @param string $group Optional. Where the cache contents are grouped. Default 'default'.
* @param bool $force Optional. Whether to force an update of the local cache
* from the persistent cache. Default false.
* @return array Array of values organized into groups.
* @return array Array of return values, grouped by key. Each value is either
* the cache contents on success, or false on failure.
*/
public function get_multiple( $keys, $group = 'default', $force = false ) {
$values = array();
@@ -389,7 +391,8 @@ class WP_Object_Cache {
*
* @param array $keys Array of keys to be deleted.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @return array Array of return values.
* @return bool[] Array of return values, grouped by key. Each value is either
* true on success, or false if the contents were not deleted.
*/
public function delete_multiple( array $keys, $group = '' ) {
$values = array();