Ask YC: PHP Coding Standards?
PEAR? Or some other set?
Thanks guys!
PEAR? Or some other set?
Thanks guys!
http://docs.artisansystem.com/index.php/Coding_Standard
They can be a little verbose at first, but they make for better readability.
Before I moved to functionalized queries, I would always make my queries look as formatted as possible, especially when they contained a lot of joins.
Also, my biggest pet peeve is not having braces around large case statements as it makes it difficult to find the next case statement, I like using my editor to find the matching brace.
2. Use php_CodeSniffer to check if yout code coonforms to the standard. http://matrix.squiz.net/developer/tools/php_cs
3. Make CodeSniffer a pre-commit hook so that when you commit co to SVN it doesn't let you until, your code follows the standard.
and done.