diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 7b156d8a605fa..371b78895801e 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -1141,11 +1141,7 @@ public function step( $node_to_process = self::PROCESS_NEXT_NODE ): bool { * Breadcrumbs start at the outermost parent and descend toward the matched element. * They always include the entire path from the root HTML node to the matched element. * - * @todo It could be more efficient to expose a generator-based version of this function - * to avoid creating the array copy on tag iteration. If this is done, it would likely - * be more useful to walk up the stack when yielding instead of starting at the top. - * - * Example + * Example: * * $processor = WP_HTML_Processor::create_fragment( '

' ); * $processor->next_tag( 'IMG' ); @@ -1153,9 +1149,9 @@ public function step( $node_to_process = self::PROCESS_NEXT_NODE ): bool { * * @since 6.4.0 * - * @return string[]|null Array of tag names representing path to matched node, if matched, otherwise NULL. + * @return string[] Array of tag names representing path to matched node. */ - public function get_breadcrumbs(): ?array { + public function get_breadcrumbs(): array { return $this->breadcrumbs; }