-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PHPCBF fails to fix file with empty statement at start on control structure #2810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is replicated using the included Squiz standard, and is a conflict between |
…t the start of control structures (ref #2810)
…t the start of control structures (ref #2810)
I've committed a fix for this. Given this is an empty statement, the if ( 2 === 2 ) {
;
echo "hello";
} The Thanks for the report. |
phpcf gets stuck in an inifinite loop if the code contains "{;" (which can happen by accident)
It' will do loads of passes where it encounters 0/ violations remaining but then again there are 1, 2, many violations so it never ends.
Sample code:
Sample output:
===
Suggested fix:
The text was updated successfully, but these errors were encountered: