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.
By default they are Symfony code conventions but the tool is now a standalone one and it supports PSR and user contributed rules too now:
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:
php-cs-fixer fix
And all the new code we have written will be fixed to follow our standards. Seems that it can also be hooked into Travis.
PR coming.
The text was updated successfully, but these errors were encountered:
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.
By default they are Symfony code conventions but the tool is now a standalone one and it supports PSR and user contributed rules too now:
https://github.com/FriendsOfPHP/PHP-CS-Fixer
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.
PR coming.
The text was updated successfully, but these errors were encountered: