From 0cf4698be4bdf2a6f000ec6565243ed690ceb1c7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 7 Aug 2025 14:47:34 +0000 Subject: [PATCH] Docs: Correct return and parameter types for `WP_Block_List` methods. Follow-up to [48159], [56803]. Props marian1. Fixes #63753. Built from https://develop.svn.wordpress.org/trunk@60618 git-svn-id: http://core.svn.wordpress.org/trunk@59954 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-block-list.php | 16 ++++++++-------- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-includes/class-wp-block-list.php b/wp-includes/class-wp-block-list.php index 81f01eb0ca..b56b3bd69d 100644 --- a/wp-includes/class-wp-block-list.php +++ b/wp-includes/class-wp-block-list.php @@ -67,7 +67,7 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable { * * @link https://www.php.net/manual/en/arrayaccess.offsetexists.php * - * @param string $offset Offset of block to check for. + * @param int $offset Offset of block to check for. * @return bool Whether block exists. */ #[ReturnTypeWillChange] @@ -82,8 +82,8 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable { * * @link https://www.php.net/manual/en/arrayaccess.offsetget.php * - * @param string $offset Offset of block value to retrieve. - * @return mixed|null Block value if exists, or null. + * @param int $offset Offset of block value to retrieve. + * @return WP_Block|null Block value if exists, or null. */ #[ReturnTypeWillChange] public function offsetGet( $offset ) { @@ -105,8 +105,8 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable { * * @link https://www.php.net/manual/en/arrayaccess.offsetset.php * - * @param string $offset Offset of block value to set. - * @param mixed $value Block value. + * @param int $offset Offset of block value to set. + * @param array|WP_Block $value Block value. */ #[ReturnTypeWillChange] public function offsetSet( $offset, $value ) { @@ -124,7 +124,7 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable { * * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php * - * @param string $offset Offset of block value to unset. + * @param int $offset Offset of block value to unset. */ #[ReturnTypeWillChange] public function offsetUnset( $offset ) { @@ -150,7 +150,7 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable { * * @link https://www.php.net/manual/en/iterator.current.php * - * @return mixed Current element. + * @return WP_Block|null Current element. */ #[ReturnTypeWillChange] public function current() { @@ -164,7 +164,7 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable { * * @link https://www.php.net/manual/en/iterator.key.php * - * @return mixed Key of the current element. + * @return int|null Key of the current element. */ #[ReturnTypeWillChange] public function key() { diff --git a/wp-includes/version.php b/wp-includes/version.php index 31fd1df0af..a1a430a96e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60617'; +$wp_version = '6.9-alpha-60618'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.