#!/usr/bin/env php * @author Marc McIntyre * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600) * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence * @link http://pear.php.net/package/PHP_CodeSniffer */ error_reporting(E_ALL | E_STRICT); // Optionally use PHP_Timer to print time/memory stats for the run. // Note that the reports are the ones who actually print the data // as they decide if it is ok to print this data to screen. @include_once 'PHP/Timer.php'; if (class_exists('PHP_Timer', false) === true) { PHP_Timer::start(); } 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); } ?>