I've taken over a mixed PHP4/PHP5 project which has been handed down from developer to developer, with each one making things worse. Before I spend too much time on it I'd like to develop a base-standard, with consistent formatting at a minimum.
Can anyone recommend a utility (Linux or Mac OS X preferably) that will reformat the code?
If I can set parameters which influence output (like tab-indentation, brace/bracket placement, when to split array values onto new lines etc.) then that's a benefit, though not crucial.
Preference goes to Open Source tools, though I'd like to know your experiences with purchased software too.