How do I adapt Eclipse PHP code formatter for Symfony coding standards?
Especially I want to get rid of spaces around concatenation operator which the code formatter adds with any of default profiles as of writing.
$a = $b->bar.'*'.$c->baz; // not $b->bar . '*' . $c->baz
Code formatter allows to export and import a profile in XML, but it isn't clear which directive in it is responsible for the above spaces.
See this slightly modified PSR-2 profile I used as a starting point, without success.
Go to Source | Format Document or press Ctrl+Shift+F.
Sadly this is not possible without editing source. You can rather change source code your self or ask a feature request to make it happened, which no one knows if someone will do it.
Here are editable preferences and I don't see anywhere that.
https://github.com/eclipse/pdt/blob/master/plugins/org.eclipse.php.formatter.core/src/org/eclipse/php/formatter/core/CodeFormatterPreferences.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With