Closed Chi-teck closed 1 year ago
Closing as already fixed via #3777, which will be included in PHPCS 3.8.0.
FYI: the fix for this issue is included in today's PHP_CodeSniffer 3.8.0 release.
As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo).
Describe the bug
Since PHP 8.0 expressions can now throw exceptions. So the code below is valid. However, it triggers
Squiz.PHP.NonExecutableCode.Unreachable
warning.Code sample