Quick Tip: Using Aptana to format your PHP to Drupal's Coding Standards

For those who use Aptana, I just found its formatting tool to be very useful. It can quickly help you set your code to Drupal's Coding Standards

To use it just go to Apatana's menu Source >> Format:


By default, however, arrays may not be formatted as expected. To change this, you need to update the default configuration options:

  1. Go to Aptana's preferences
  2. Type "formatter" click on "Formatter" 
  3. In Preview select PHP and edit it 
  4. Then in the tab: "New Lines" 
  5. Check: Insert new line between array creation elements.

Now you can use this tool to quickly format your code to Drupal's Coding Standards


Felix Silberstein