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.

All indentation should not use tabs; use 4 spaces instead.

Comments, class, and variable names should use US English spelling.

Each file should contain exactly one class or interface, with one exception:

  • DAO interfaces can include the access object in the interface file

Require_once statements should use single quotes, no parentheses, ie, require_once 'init.php';

ThinkTank implements the Model-View-Controller design pattern. All new code should follow suit. Read more about ThinkTank’s MVC implementation.

Language Specifics

Clone this wiki locally