-
Notifications
You must be signed in to change notification settings - Fork 1
Coding Standards
Aaron McGowan edited this page Sep 5, 2013
·
3 revisions
All code contributed to the ImageX base installation profile must adhere to the Drupal.org's Coding Standards and meet the specialized requirements below.
- All module names will begin with
imagex. - As a result of the naming of modules, all user-defined functions will be prefixed with
imagex.
- Type hinting should be used in all possible cases.
The term "class" refers to all classes, interfaces and traits. In addition, Drupal.org's Coding Standards must be followed. Additional requirements and guidelines appended below must be followed.
As a result of Drupal requiring at least version 5.2 of PHP and not 5.3, these are the caveats of the Drupal's guideline that should be followed when working with classes due to namespaces not being supported in PHP 5.2.
- All user-defined classes will be prefixed using
Imagexand notImageX. Additionally, class names must not have separation tokens such as_. - All user-defined interfaces will be fixed using
Imagexand notImageX. Defined interfaces will have a suffix ofInterface.
- All code contributed to the ImageX base installation profile must be written with a non-client or project specific implementation to allow for continuous reusability of it.