Friday 16 February 2007 8:42:16 am
Waterproof released their nice PHP Code beautifier also as Linux version.
You can fetch it from http://www.waterproof.fr/products/phpCodeBeautifier/ It is really helpful. I made a tiny shell script that uses it to match with the eZ coding style ( usefull for network etc ).
#!/bin/bash
./phpCB -space-before-end-bracket \
-space-after-start-bracket \
-space-after-end-angle-bracket \
-extra-padding-for-case-statement \
-one-true-brace-function-declaration \
-change-shell-comment-to-double-slashes-comment \
-force-large-php-code-tag \
-force-true-false-null-contant-lowercase \
--comment-rendering-style PHPDoc \
--equal-align-position 50 \
--padding-char-count 4 \
$1
I thought you might find that useful. Here an idea how to check coding style:
./beautify ugly.php > beauty.php && diff --side-by-side ugly.php beauty.php
Because it is still just a computer programm, it helps but might also have disadvantages in specific situations.
|