I’m using a pre-commit hook to lint-check PHP source submitted by our staff, and everyone’s really happy with the results. The staff have agreed it would be useful to have the code re-formatted to follow (customizable) style rules on commit. Are there any FOSS scripts which can do this from the command-line?
Share
Was looking for the same thing, just came across the PHP Beautfier package in the PEAR repository:
http://pear.php.net/package/PHP_Beautifier
Hope this helps!