Make WordPress Core

Changeset 60618


Ignore:
Timestamp:
08/07/2025 02:45:05 PM (6 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct return and parameter types for WP_Block_List methods.

Follow-up to [48159], [56803].

Props marian1.
Fixes #63753.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block-list.php

    r60325 r60618  
    6868     * @link https://www.php.net/manual/en/arrayaccess.offsetexists.php
    6969     *
    70      * @param string $offset Offset of block to check for.
     70     * @param int $offset Offset of block to check for.
    7171     * @return bool Whether block exists.
    7272     */
     
    8383     * @link https://www.php.net/manual/en/arrayaccess.offsetget.php
    8484     *
    85      * @param string $offset Offset of block value to retrieve.
    86      * @return mixed|null Block value if exists, or null.
     85     * @param int $offset Offset of block value to retrieve.
     86     * @return WP_Block|null Block value if exists, or null.
    8787     */
    8888    #[ReturnTypeWillChange]
     
    106106     * @link https://www.php.net/manual/en/arrayaccess.offsetset.php
    107107     *
    108      * @param string $offset Offset of block value to set.
    109      * @param mixed  $value Block value.
     108     * @param int            $offset Offset of block value to set.
     109     * @param array|WP_Block $value Block value.
    110110     */
    111111    #[ReturnTypeWillChange]
     
    125125     * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php
    126126     *
    127      * @param string $offset Offset of block value to unset.
     127     * @param int $offset Offset of block value to unset.
    128128     */
    129129    #[ReturnTypeWillChange]
     
    151151     * @link https://www.php.net/manual/en/iterator.current.php
    152152     *
    153      * @return mixed Current element.
     153     * @return WP_Block|null Current element.
    154154     */
    155155    #[ReturnTypeWillChange]
     
    165165     * @link https://www.php.net/manual/en/iterator.key.php
    166166     *
    167      * @return mixed Key of the current element.
     167     * @return int|null Key of the current element.
    168168     */
    169169    #[ReturnTypeWillChange]
Note: See TracChangeset for help on using the changeset viewer.