/** * Sets up this unit test. * * @return void */ protected function setUp() { if (self::$phpcs === null) { self::$phpcs = new PHP_CodeSniffer(); } PHP_CodeSniffer::setConfigData('testVersion', null, true); self::$phpcs->process(array(), 'PHPCompatibility'); self::$phpcs->setIgnorePatterns(array()); }
/** * Sets up this unit test. * * @return void */ protected function setUp() { if (self::$phpcs === null) { self::$phpcs = new PHP_CodeSniffer(); } PHP_CodeSniffer::setConfigData('testVersion', null, true); if (method_exists('PHP_CodeSniffer_CLI', 'setCommandLineValues')) { // For PHPCS 2.x self::$phpcs->cli->setCommandLineValues(array('-p', '--colors')); } self::$phpcs->process(array(), __DIR__ . '/../'); self::$phpcs->setIgnorePatterns(array()); }