$ php -v):=> 7.1.12
$ php-cs-fixer -V):=> 2.9.0
=> php-cs-fixer fix . --rules=combine_consecutive_issets
if(isset($a) && isset($b)) {
...
}
if (isset($a, $b) ) {
...
}
if (isset($a, $b)) {
...
}
I was just about to submit a fix for that, but I realize that even our tests have this space. Is this on purpose, or something that should be fix?
cc @SpacePossum as author of rule
Hi @carusogabriel and thanks for opening this issue.
I've designed the fixer to do one thing (combining consecutive isset calls into one call) and nothing more. Keeping to the single responsibility principle comes with great benefits, especially in this project.
Removing the additional white space seems trivial but might become complex when a lot comments are around it or when other configuration options are applicable.
Therefore I left the white space handling to another dedicated fixer that was already present; no_spaces_inside_parenthesis
The priority system will make sure the end result is what you want.
Please let me know if you've more questions about this :+1:
@SpacePossum Thanks for your explanation. I’ll combine the two rules to achieve what I want 👨💻