Skip to content
ginatrapani edited this page Sep 13, 2010 · 87 revisions

Welcome to the ThinkTank Code style guide. When submitting pull requests, please make sure that your changes conform to the styles below.

Styles loosely based upon Drupal’s coding standards, which are themselves loosely based on the PEAR coding standards.

This document is a work in progress. When in doubt, follow the same style as existing ThinkTank code.

All Code

Lines should have no trailing whitespace at their end.

Comments and names should use US English spelling.

By Language

Smarty (TODO)

PHP

To start, assume we’re using the Drupal PHP coding style unless otherwise noted here.

Always use <?php ?> to delimit PHP code, not the shorthand, <? ?>, as this is the most used and supported across PHP setups and the one PHP will continue supporting in the future.

Clone this wiki locally