Last Updated: February 25, 2016
· iaugur

Integration of PHP Codesniffer with Netbeans & Drupal

I have recently streamlined my development environment set-up on OSX using Homebrew. That means I have installed Drush with:

brew install drush

brew install php-code-sniffer

Download and extract the coder module and copy to Drush/commands


then symlink the Drupal stds to PHP-CODE-SNIFFER

ln -sv /usr/local/Cellar/drush/6.2.0/libexec/commands/coder/coder_sniffer/Drupal /usr/local/Cellar/php-code-sniffer/1.5.2/CodeSniffer/Standards/Drupal

After you have downloaded and installed PHP Code Sniffer

Netbeans>Preferences>PHP>Code Analysis

Select the /usr/local/Cellar/php-code-sniffer/1.5.2/scripts/phpcs
Note this is not the one symlinked in the bin folder.
Once you do that your Drupal coding standards are avialable
I will provide a more detailed write up of setting up an OSX development environment soon.Picture
Once you hit Apply you will see the following output: