Skip to content

Instantly share code, notes, and snippets.

@alister
Created November 22, 2011 15:27
Show Gist options
  • Save alister/1385932 to your computer and use it in GitHub Desktop.
Save alister/1385932 to your computer and use it in GitHub Desktop.
php code sniffer extension
<?php
// in the ..../Example/ directory
require_once 'PHP/CodeSniffer/Standards/CodingStandard.php';
class PHP_CodeSniffer_Standards_Example_ExampleCodingStandard
extends PHP_CodeSniffer_Standards_CodingStandard
{
function getIncludedSniffs()
{
return array(
'PEAR', // the main PEAR standards
// Add our other standards, all from a subdir
dirname(__FILE__).'/Standards',
);
}
function getExcludedSniffs()
{
return array();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment