Configure PHP CS Fixer
Sometimes, we mess up the basic rules of code style. So we need a friend to cover our back! With PHP we are using PHP CS Fixer by to configure it we follow the steps below.
We needn't have CS Fixer on any other environment.
Strongly recommended to exclude auto-generated files like
Migrations for example. That kind of file may be risky to overwrite.
You can find all CS rules on this repository.
If this is a greenfield project then enable risky rules without worries, otherwise, disable risky rules or make sure applied rules do not cause any side effects.
If the behavior is as expected, then let's build some bigger projects 😎