Skip to content

Commit 88e05dd

Browse files
committed
Remove additional breaks after gotos
1 parent 464079d commit 88e05dd

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

‎src/wp-includes/html-api/class-wp-html-processor.php‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,6 @@ private function step_before_html(): bool {
16771677
return $this->step();
16781678
}
16791679
goto before_html_anything_else;
1680-
break;
16811680

16821681
/*
16831682
* > A start tag whose tag name is "html"
@@ -1699,7 +1698,6 @@ private function step_before_html(): bool {
16991698
* > Act as described in the "anything else" entry below.
17001699
*/
17011700
goto before_html_anything_else;
1702-
break;
17031701
}
17041702

17051703
/*
@@ -1759,7 +1757,6 @@ private function step_before_head(): bool {
17591757
return $this->step();
17601758
}
17611759
goto before_head_anything_else;
1762-
break;
17631760

17641761
/*
17651762
* > A comment token
@@ -1804,7 +1801,6 @@ private function step_before_head(): bool {
18041801
case '-BODY':
18051802
case '-HTML':
18061803
goto before_head_anything_else;
1807-
break;
18081804
}
18091805

18101806
if ( $is_closer ) {
@@ -1860,7 +1856,6 @@ private function step_in_head(): bool {
18601856
}
18611857

18621858
goto in_head_anything_else;
1863-
break;
18641859

18651860
/*
18661861
* > A comment token
@@ -1992,7 +1987,6 @@ private function step_in_head(): bool {
19921987
* > Act as described in the "anything else" entry below.
19931988
*/
19941989
goto in_head_anything_else;
1995-
break;
19961990

19971991
/*
19981992
* > A start tag whose tag name is "template"
@@ -2085,7 +2079,6 @@ private function step_in_head_noscript(): bool {
20852079
}
20862080

20872081
goto in_head_noscript_anything_else;
2088-
break;
20892082

20902083
/*
20912084
* > A DOCTYPE token
@@ -2189,7 +2182,6 @@ private function step_after_head(): bool {
21892182
return true;
21902183
}
21912184
goto after_head_anything_else;
2192-
break;
21932185

21942186
/*
21952187
* > A comment token
@@ -2278,7 +2270,6 @@ private function step_after_head(): bool {
22782270
* > Act as described in the "anything else" entry below.
22792271
*/
22802272
goto after_head_anything_else;
2281-
break;
22822273
}
22832274

22842275
/*
@@ -3820,7 +3811,6 @@ private function step_in_column_group(): bool {
38203811
}
38213812

38223813
goto in_column_group_anything_else;
3823-
break;
38243814

38253815
/*
38263816
* > A comment token
@@ -4381,7 +4371,6 @@ private function step_after_body(): bool {
43814371
return $this->step_in_body();
43824372
}
43834373
goto after_body_anything_else;
4384-
break;
43854374

43864375
/*
43874376
* > A comment token
@@ -4704,7 +4693,6 @@ private function step_after_after_body(): bool {
47044693
return $this->step_in_body();
47054694
}
47064695
goto after_after_body_anything_else;
4707-
break;
47084696
}
47094697

47104698
/*

‎tests/phpstan/baselines/deadCode.unreachable.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ parameters:
5656
-
5757
message: '#^Unreachable statement \- code above always terminates\.$#'
5858
identifier: deadCode.unreachable
59-
count: 30
59+
count: 18
6060
path: ../../../src/wp-includes/html-api/class-wp-html-processor.php
6161
-
6262
message: '#^Unreachable statement \- code above always terminates\.$#'

0 commit comments

Comments
 (0)