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
NoSuperfluousConcatenationFixer replaces double quotes w single quotes #916
Labels
Comments
Hi @BlueM, it seems like a nice improvement, would you like to raise PR with such a feature? |
So far, I haven’t even tried to understand how php-cs-fixer or your fixers work. Therefore, this would probably be a challenge for me, but at least I could try. But it will take a while, especially as I know that I won’t have time for this within the next six to eight weeks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On a code base I work on, I have this line:
printf('"%s";"%s";"%s"'."\r\n", ...$line);
When I enable
NoSuperfluousConcatenationFixer
, this is the resulting code:printf("\"%s\";\"%s\";\"%s\"\r\n", ...$line);
So the fixer concatenated the strings, but as a side effect introduced ugly escaping due to the double quotes now being used. I can work around this in my codebase, but it would be even better to have a setting for the fixer which controls if concatenations are retained if the type of quotes would have to be changed. In this case, such a setting would leave the code as-is.
(Apart from that: great tool.)
The text was updated successfully, but these errors were encountered: