The following is just a copy-paste of this feature request, which got a reply saying that it's a confirmable bug so it should be posted in this forum instead of that one
====================================================================================================
I don't know if this is a behavior change from any previous version, but I don't remember seeing this before (OTOH, I don't use the Format PHP code option very often). At any rate, I find it pretty annoying and would like to be able to turn it off if possible.
If I have this code:
- Code: Select all
if (!empty($var) || !foo($var))
Formatting turns it into:
- Code: Select all
if (!empty ($var) || !foo($var))
I don't see a way to post a screenshot here, but the "Add Space" tab on the "PHP Formatter Settings" dialog that pops up when you run the formatter has all boxes checked except for:
- Before cemicolon (sic)
- Inside expresison (sic) parenthesis
- Inside method call parenthesis
I don't see any option that seems likely to be responsible for the reformatting done to insert a space between empty and left-parenthesis. It doesn't happen for function names.
I'm not actually familiar with the editorconfig tool mentioned in this topic, but if it handles that level of detailed options, maybe this is a vote for that topic. The current PHP code formatter with all its options is really very nice, don't get me wrong. It's just this one little thing that has suddenly caught my eye and become annoying