I would like to format the php files that I have in a directory, so that the code looks tidy and readable. I know how to do this via eclipse php, but is their a way to do several files in one go, via code?
Asked
Active
Viewed 165 times
0
-
there are bunch of "PHP Beautifier" websites that will do it for you.... – A.O. Dec 18 '13 at 17:27
-
dub http://stackoverflow.com/questions/15655126/how-to-auto-format-code-in-eclipse – Ronni Skansing Dec 18 '13 at 17:27
1 Answers
0
Fabien Potencier (of Symfony fame) has written a small utility that can modify code to comply with PHPCodeSniffer defined standards for PSR-n - PHP-CS-Fixer - although it isn't perfect

Mark Baker
- 209,507
- 32
- 346
- 385
-
-
This method doesn't require the symphony framework; it's a self-contained application that uses a couple of Symfony components that are included in the "bundle", automatically included via a composer install – Mark Baker Dec 19 '13 at 15:47