From 96dd4673f7d44175050d561a91d9733c059cafdc Mon Sep 17 00:00:00 2001 From: Jan Jakes Date: Tue, 12 Nov 2024 16:08:42 +0100 Subject: [PATCH] Rename $rule to $branches for better clarity --- wp-includes/parser/class-wp-parser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/parser/class-wp-parser.php b/wp-includes/parser/class-wp-parser.php index 6b21cc16..80d65cfb 100644 --- a/wp-includes/parser/class-wp-parser.php +++ b/wp-includes/parser/class-wp-parser.php @@ -43,8 +43,8 @@ private function parse_recursive( $rule_id ) { return null; } - $rule = $this->grammar->rules[ $rule_id ]; - if ( ! count( $rule ) ) { + $branches = $this->grammar->rules[ $rule_id ]; + if ( ! count( $branches ) ) { return null; } @@ -62,7 +62,7 @@ private function parse_recursive( $rule_id ) { $rule_name = $this->grammar->rule_names[ $rule_id ]; $starting_position = $this->position; - foreach ( $rule as $branch ) { + foreach ( $branches as $branch ) { $this->position = $starting_position; $node = new WP_Parser_Node( $rule_id, $rule_name ); $branch_matches = true;