Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wimg/PHP_CodeSniffer
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Dec 2, 2013
2 parents 4db2e70 + ad867ef commit 811261b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CodeSniffer/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class PHP_CodeSniffer_CLI
*/
public $dieOnUnknownArg = true;


/**
* Exits if the minimum requirements of PHP_CodSniffer are not met.
*
Expand Down Expand Up @@ -272,7 +271,6 @@ public function processShortArgument($arg, $pos, $values)
} else {
ini_set($ini[0], true);
}

break;
case 'n' :
$values['warningSeverity'] = 0;
Expand Down Expand Up @@ -327,6 +325,13 @@ public function processLongArgument($arg, $pos, $values)
print_r($data);
exit(0);
break;
case 'runtime-set':
$key = $_SERVER['argv'][($pos + 1)];
$value = $_SERVER['argv'][($pos + 2)];
$_SERVER['argv'][($pos + 1)] = '';
$_SERVER['argv'][($pos + 2)] = '';
PHP_CodeSniffer::setConfigData($key, $value, true);
break;
default:
if (substr($arg, 0, 7) === 'sniffs=') {
$sniffs = substr($arg, 7);
Expand Down Expand Up @@ -815,6 +820,8 @@ public function printUsage()
echo ' [--config-set key value] [--config-delete key] [--config-show]'.PHP_EOL;
echo ' [--standard=<standard>] [--sniffs=<sniffs>] [--encoding=<encoding>]'.PHP_EOL;
echo ' [--extensions=<extensions>] [--ignore=<patterns>] <file> ...'.PHP_EOL;
echo ' --runtime-set key value'.PHP_EOL;
echo ' Set runtime value (see --config-set) '.PHP_EOL;
echo ' -n Do not print warnings (shortcut for --warning-severity=0)'.PHP_EOL;
echo ' -w Print both warnings and errors (on by default)'.PHP_EOL;
echo ' -l Local directory only, no recursion'.PHP_EOL;
Expand Down

0 comments on commit 811261b

Please sign in to comment.