Lines Matching refs:this

234             $this->setVerbosity($verbosity);
238 $this->setTabWidth($tabWidth);
242 $this->setEncoding($encoding);
246 $this->setInteractive($interactive);
263 $this->cli = new PHP_CodeSniffer_CLI();
264 $this->cli->errorSeverity = PHPCS_DEFAULT_ERROR_SEV;
265 $this->cli->warningSeverity = PHPCS_DEFAULT_WARN_SEV;
266 $this->cli->dieOnUnknownArg = false;
268 $this->reporting = new PHP_CodeSniffer_Reporting();
415 if (isset($this->allowedFileExtensions[$ext]) === true) {
416 $newExtensions[$ext] = $this->allowedFileExtensions[$ext];
417 } else if (isset($this->defaultFileExtensions[$ext]) === true) {
418 $newExtensions[$ext] = $this->defaultFileExtensions[$ext];
424 $this->allowedFileExtensions = $newExtensions;
443 $this->ignorePatterns = $patterns;
462 return $this->ignorePatterns;
465 if (isset($this->ignorePatterns[$listener]) === true) {
466 return $this->ignorePatterns[$listener];
483 $this->cli = $cli;
505 $this->initStandard($standards, $restrictions);
506 $this->processFiles($files, $local);
526 $this->listeners = array();
527 $this->sniffs = array();
528 $this->ruleset = array();
529 $this->_tokenListeners = array();
538 $installed = $this->getInstalledStandardPath($standards[0]);
550 $sniffs = $this->_expandRulesetReference($restrictions[0], dirname($standard));
554 $installed = $this->getInstalledStandardPath($standard);
578 $sniffs = array_merge($sniffs, $this->processRuleset($standard));
594 $this->registerSniffs($sniffs, $sniffRestrictions, $sniffExclusions);
595 $this->populateTokenListeners();
598 $numSniffs = count($this->sniffs);
619 $cliValues = $this->cli->getCommandLineValues();
627 if (empty($this->allowedFileExtensions) === true) {
628 $this->allowedFileExtensions = $this->defaultFileExtensions;
631 $todo = $this->getFilesToProcess($files, $local);
643 $this->file = $file;
653 $phpcsFile = $this->processFile($file, null);
739 $cliValues = $this->cli->getCommandLineValues();
750 … $ownSniffs = $this->_expandSniffDirectory($rulesetDir.DIRECTORY_SEPARATOR.'Sniffs', $depth);
755 if ($this->_shouldProcessElement($config) === false) {
759 $this->setConfigData((string) $config['name'], (string) $config['value'], true);
768 || $this->_shouldProcessElement($rule) === false
780 $this->_expandRulesetReference($rule['ref'], $rulesetDir, $depth)
785 if ($this->_shouldProcessElement($exclude) === false) {
798 $this->ruleset[(string) $exclude['name']]['severity'] = 0;
806 … $this->_expandRulesetReference($exclude['name'], $rulesetDir, ($depth + 1))
812 $this->_processRule($rule, $depth);
818 if ($this->_shouldProcessElement($arg) === false) {
841 if ($this->_shouldProcessElement($arg) === false) {
889 $this->cli->setCommandLineValues($cliArgs);
898 if ($this->_shouldProcessElement($pattern) === false) {
906 $this->ignorePatterns[(string) $pattern] = (string) $pattern['type'];
1065 $path = $this->getInstalledStandardPath($ref);
1103 $stdPath = $this->getInstalledStandardPath($stdName);
1152 return $this->processRuleset($ref.DIRECTORY_SEPARATOR.'ruleset.xml', ($depth + 2));
1162 return $this->_expandSniffDirectory($ref, ($depth + 1));
1180 return $this->processRuleset($ref, ($depth + 2));
1202 && $this->_shouldProcessElement($rule->severity) === true
1204 if (isset($this->ruleset[$code]) === false) {
1205 $this->ruleset[$code] = array();
1208 $this->ruleset[$code]['severity'] = (int) $rule->severity;
1217 && $this->_shouldProcessElement($rule->type) === true
1219 if (isset($this->ruleset[$code]) === false) {
1220 $this->ruleset[$code] = array();
1223 $this->ruleset[$code]['type'] = (string) $rule->type;
1232 && $this->_shouldProcessElement($rule->message) === true
1234 if (isset($this->ruleset[$code]) === false) {
1235 $this->ruleset[$code] = array();
1238 $this->ruleset[$code]['message'] = (string) $rule->message;
1247 && $this->_shouldProcessElement($rule->properties) === true
1250 if ($this->_shouldProcessElement($prop) === false) {
1254 if (isset($this->ruleset[$code]) === false) {
1255 $this->ruleset[$code] = array(
1258 } else if (isset($this->ruleset[$code]['properties']) === false) {
1259 $this->ruleset[$code]['properties'] = array();
1279 $this->ruleset[$code]['properties'][$name] = $values;
1285 $this->ruleset[$code]['properties'][$name] = (string) $prop['value'];
1296 if ($this->_shouldProcessElement($pattern) === false) {
1300 if (isset($this->ignorePatterns[$code]) === false) {
1301 $this->ignorePatterns[$code] = array();
1308 $this->ignorePatterns[$code][(string) $pattern] = (string) $pattern['type'];
1432 $this->sniffs = $listeners;
1446 $this->_tokenListeners = array();
1448 foreach ($this->sniffs as $listenerClass) {
1460 $this->listeners[$listenerClass] = new $listenerClass();
1461 $this->sniffCodes[$code] = $listenerClass;
1464 if (isset($this->ruleset[$code]['properties']) === true) {
1465 foreach ($this->ruleset[$code]['properties'] as $name => $value) {
1466 $this->setSniffProperty($listenerClass, $name, $value);
1480 $tokens = $this->listeners[$listenerClass]->register();
1489 $patterns = $this->getIgnorePatterns($listenerSource);
1502 if (isset($this->_tokenListeners[$token]) === false) {
1503 $this->_tokenListeners[$token] = array();
1506 if (isset($this->_tokenListeners[$token][$listenerClass]) === false) {
1507 $this->_tokenListeners[$token][$listenerClass] = array(
1532 if (isset($this->listeners[$listenerClass]) === false) {
1548 $this->listeners[$listenerClass]->$name = $value;
1597 if ($this->shouldProcessFile($file->getPathname(), $path) === false) {
1604 if ($this->shouldIgnoreFile($path, dirname($path)) === true) {
1647 $matches = array_intersect_key($extensions, $this->allowedFileExtensions);
1653 if ($this->shouldIgnoreFile($path, $basedir) === true) {
1678 foreach ($this->ignorePatterns as $pattern => $type) {
1772 $phpcsFile = $this->_processFile($file, $contents);
1799 $this->_tokenListeners,
1800 $this->ruleset,
1801 $this
1807 $cliValues = $this->cli->getCommandLineValues();
1811 $this->reporting->cacheFileReport($phpcsFile, $cliValues);
1830 $reportClass = $this->reporting->factory('full');
1831 $reportData = $this->reporting->prepareFileReport($phpcsFile);
1848 $this->populateTokenListeners();
1849 $phpcsFile = $this->_processFile($file, $contents);
1874 $cliValues = $this->cli->getCommandLineValues();
1889 $this->_tokenListeners,
1890 $this->ruleset,
1891 $this
1951 return $this->listeners;
1963 return $this->_tokenListeners;