Skip to content

Commit

Permalink
Rename $rule to $branches for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
JanJakes committed Nov 12, 2024
1 parent 634635e commit 96dd467
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wp-includes/parser/class-wp-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 96dd467

Please sign in to comment.