Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing PHP Coding Standards

We're about to look at implementing some PHP Coding Standards in our workplace to add some consistency between all of our developers.

I've read around and seen Zend and PEAR standards etc, but what's the best way to enforce these? I've found a PHP Codesniffer plugin for netbeans, but are there any other ways I could enforce a standard, possibly CI (Continuous Integration) / Hudson or even when committing to SVN?

I was just wondering If anyone had experience or any other tools/methods I could look into?

Thanks

like image 961
terrid25 Avatar asked Jun 19 '26 22:06

terrid25


1 Answers

CodeSniffer is indeed the best tool for this.

There is a number of ways to use it:

  • integrating into Eclipse
  • integrate as pre-commit hook in you VCS
  • integrating into your CI Server

Disclaimer: the linked pages are just random picks from Google on that topic. They are not to suggest to use Eclipse, SVN or Hudson. Use what you think is appropriate for your development environment.

Also see http://www.qatools.org for additional tools.

like image 116
Gordon Avatar answered Jun 22 '26 23:06

Gordon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!