Php-cs-fixer: Where can I find default configuration?

Created on 13 Sep 2018  Â·  2Comments  Â·  Source: FriendsOfPHP/PHP-CS-Fixer

Hello. I want to find default rule set used by PHP-CS-Fixer in .php_cs format. Didn't find it in docs. It's easier to maintain project codestyle when you can look at config and understand what will be happened when you'll run the fixer.

Is it just ['@PSR2' => true]?

kinquestion

All 2 comments

README.rst serves for docs in this case - each rule has an information to which ruleset it belongs.

Rulesets are defined here.

And if you only want to see what will be fixed you can use flags --dry-run --diff.

Indeed, default ruleset is @PSR2, it's defined by our code: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.12/src/Config.php#L34

if you may, please raise a PR to expose it in readme as well, thanks !

in the meantime, I'm closing this question, as your question has been answered

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kcloze picture kcloze  Â·  3Comments

BackEndTea picture BackEndTea  Â·  3Comments

grachevko picture grachevko  Â·  3Comments

EvgenyOrekhov picture EvgenyOrekhov  Â·  3Comments

vitek-rostislav picture vitek-rostislav  Â·  3Comments