Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Use php-cs-fixer to automatically format our code #435
There is a great tool created by Fabien Potencier (creator of the Symfony framework) that automatically reformat your PHP code according to a set of code conventions.
I tried it locally and it should help us keep consistency I think, I created a set of rules that reflect what we do in the project (basically PSR2 + most rules from symfony).
That means that once we are ready to provide a patch, we just have to go to the root of the project and type:
And all the new code we have written will be fixed to follow our standards. Seems that it can also be hooked into Travis.