views:

76

answers:

2

I have a large-ish PHP project (hundreds of files) that I've been brought in to work on and the source formatting hasn't been very consistent from the beginning. I'd now like to take all source and format it according to the Zend Framework coding standards (tabs to spaces, short tags to full php tags, correct indenting, etc.), however this is not a job that can be done manually. How can I automate this process?

+1  A: 

Try searching for php code beautifiers. There's phpCodeBeautifier, PHP_Beautifier (PEAR) and PHPed comes with PolyStyle.

webbiedave
+1  A: 

Eclipse has a code template that you can modify and apply. Its silly to enforce coding standards for white space when you can run a tool to do it for you.

Rook