Make WordPress Core


Ignore:
Timestamp:
09/17/2022 05:11:51 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct @return type for WP_Block_Parser::parse().

This affects:

  • WP_Block_Parser::parse()
  • WP_Block_Parser::$output

Both the method and the property are documented as returning WP_Block_Parser_Block[] (an array of WP_Block_Parser_Block objects), but the result is in fact an array of arrays of various values, so array[] is the correct notation.

Follow-up to [43751] for the 5.0 branch, [44116] for trunk.

Props Chouby.
Fixes #56581.

File:
1 edited

Legend:

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

    r54193 r54194  
    192192         *
    193193         * @since 5.0.0
    194          * @var WP_Block_Parser_Block[]
     194         * @var array[]
    195195         */
    196196        public $output;
     
    222222         *
    223223         * @param string $document Input document being parsed.
    224          * @return WP_Block_Parser_Block[]
     224         * @return array[]
    225225         */
    226226        function parse( $document ) {
Note: See TracChangeset for help on using the changeset viewer.