In files that have multiple non-contiguous use blocks, trying to autofix the errors with phpcbf can delete entire blocks of code!
Example:
https://github.com/openemr/openemr/blob/797bb262c95b8bb989996193bb466040c1c3a00a/sphere/process_response.php#L17-L40
When autofixing this file, lines 17-36 are deleted outright.
I'd expect one of two things to happen:
- The two blocks of
use statements are combined, then sorted
- The two blocks are sorted within themselves, but left alone
In no case would I expect this rule to touch anything other than the use statements.
PHPCS: 4.0.1
Slevomat coding-standard: 8.28.0.
Update: the UseSpacing fixer does the same thing. I suspect the issue is with the UseStatementHeloer