Does anyone know of a good tool for cleaning up/formatting PHP files? I'd need something that can handle HTML with < ?php ?> tags, as well as pure PHP files. Ideally, I'd like a Maven mojo, since the rest of my code is being generated by Maven already.

  • Are you willing to pay money? Tom Guthrie over 8 years ago
  • Perhaps. If free solutions aren't up to it, I'd consider paying. Curtis Lacy over 8 years ago

3 answers

0
points

It is not a mojo, but I use Polystyle.

Answered over 8 years ago by pritaeas
  • Thanks for the suggestion, but a windows utility isn't going to work for me. Curtis Lacy over 8 years ago
0
points

You might want to try NetBeans as an IDE. Hitting ALT+SHIFT+F formats the code beautifuly.

Answered over 8 years ago by Ignacio
  • Unfortunately my PHP/HTML is being generated by a Maven mojo, and I'm looking for an automatic formatting step to add to my build. Curtis Lacy over 8 years ago
0
points

You can Try using ECLIPSE IDE http://eclipse.org/proposals/php-ide/ ..Pretty Good too..

Answered over 7 years ago by Dhanu Gupta