You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
if ( 2 === 2 ) {;
echo"hello";
}
Sample output:
Registering sniffs in the abc standard... DONE (248 sniffs registered)
Creating file list... DONE (1 files in queue)
Changing into directory /some/path/
Processing test.php [PHP => 25 tokens in 5 lines]... DONE in 103ms (2 fixable violations)
=> Fixing file: 1/2 violations remaining [made 34 passes]... ^C
===
Suggested fix:
solve that it doesn't end up stuck
additionally if a line ends with {; the ; can be removed?