Good writeup by Freek on how to get PHP-CS-Fixer and Prettier up and running.
When working on a project with other people, it’s important to pick a coding standard. Agreeing on a coding standard makes the code more readable for all developers that need to touch the project.
Addtionally I’d recommend to let these linters run in a
precommit hook. That way no “faulty” code can be committed, and everyone is forced to adhere to the standards (Although:
git commit -n …).
At the end of his post, Freek mentions that you can use Prettier to format your PHP code. The folks at Made With Love have a post on how to use Prettier with PHP.