Go to most recent revision | Blame | Last modification | View Log | RSS feed
#!@php_bin@
<?php
/**
* PHP_CodeSniffer tokenises PHP code and detects violations of a
* defined set of coding standards.
*
* PHP version 5
*
* @category PHP
* @package PHP_CodeSniffer
* @author Greg Sherwood <gsherwood@squiz.net>
* @author Marc McIntyre <mmcintyre@squiz.net>
* @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
* @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
* @version CVS: $Id: phpcs,v 1.40 2008/03/10 02:39:04 squiz Exp $
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
error_reporting(E_ALL | E_STRICT);
if (is_file(dirname(__FILE__).'/../CodeSniffer/CLI.php') === true) {
include_once dirname(__FILE__).'/../CodeSniffer/CLI.php';
} else {
include_once 'PHP/CodeSniffer/CLI.php';
}
$phpcs = new PHP_CodeSniffer_CLI();
$phpcs->checkRequirements();
$numErrors = $phpcs->process();
if ($numErrors === 0) {
exit(0);
} else {
exit(1);
}
?>