Skip to content

Commit 1321b72

Browse files
committed
Merge branch 'php-8.0/generic-emptystatement-support-match' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 580e9de + 9c7ada4 commit 1321b72

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function register()
5050
T_IF,
5151
T_SWITCH,
5252
T_WHILE,
53+
T_MATCH,
5354
];
5455

5556
}//end register()

src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ try {
6969
// TODO: Handle this exception later :-)
7070
}
7171

72-
if (true) {} elseif (false) {}
72+
if (true) {} elseif (false) {}
73+
74+
match($foo) {};

src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function getErrorList()
3939
64 => 1,
4040
68 => 1,
4141
72 => 2,
42+
74 => 1,
4243
];
4344

4445
}//end getErrorList()

0 commit comments

Comments
 (0)