Reputation: 1946
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
Upvotes: 3
Views: 432
Reputation: 24280
At 2017 you have basically 3 options:
From oldest to newest (by features and codebase):
Upvotes: 0
Reputation: 316939
CodeSniffer is indeed the best tool for this.
There is a number of ways to use it:
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.
Upvotes: 4
Reputation: 6585
I always wanted to perform code beautification on each SVN commit via SVN hooks. Still belive it's the best & most efficient way.
Currently all team members just know that XXX is approved code beautifier and everyone supposed to use it.
Upvotes: 0