PHP Coding standards
The group is name PHP Framework Interoperability Group and is composed of, but not limited to, authors from these projects:
- phpBB
- PEAR
- Doctrine
- Composer / Packagist
- Joomla
- Drupal
- CakePHP
- Amazon Web Services SDK
- Symfony
- Zend Framework
Why coding standards?
You may be a fan, for example of naming your functions with underscore or use tab indentation, but really this is not point. The goal is to be able to use code from other authors and projects without having to "fix" the code style to be consistent with your project.In the future, the group also aims at providing some interfaces so implementations from different can work together.
Accepted standards
I don’t want to rewrite all my code!
You can try PHP_CodeSniffer, but personally a find it a pain to use because it only 'validates' and make some errors. It should probably need a rewrite.
Some editors have plugins:
You can also add a Git commit hook to patch on-the-fly.