Advise Tulsa, which you could use batch to format the source code. Completely adjustable, and what would native templates with JS inserts were processed.
Preferably with preset profiles (Zend/Symfony1), supporting php 5.3.
Formulirovki as part of Netbeans latest stable version for me, but every file you need to open it by hand. Maybe some macro for this?