Skip to content

Commit

Permalink
PHP 8.0 | Generic/EmptyStatement: include match expressions
Browse files Browse the repository at this point in the history
Allows the sniff to also check for empty match expressions.

Includes unit test.
  • Loading branch information
jrfnl committed Feb 23, 2021
1 parent 8b0137a commit 9c7ada4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function register()
T_IF,
T_SWITCH,
T_WHILE,
T_MATCH,
];

}//end register()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ try {
// TODO: Handle this exception later :-)
}

if (true) {} elseif (false) {}
if (true) {} elseif (false) {}

match($foo) {};
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function getErrorList()
64 => 1,
68 => 1,
72 => 2,
74 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit 9c7ada4

Please sign in to comment.