function Config::processUnknownArgument
Processes an unknown command line argument.
Assumes all unknown arguments are files and folders to check.
Parameters
string $arg The command line argument.:
int $pos The position of the argument on the command line.:
Return value
void
Throws
\PHP_CodeSniffer\Exceptions\DeepExitException
3 calls to Config::processUnknownArgument()
- Config::processLongArgument in vendor/
squizlabs/ php_codesniffer/ src/ Config.php - Processes a long (--example) command-line argument.
- Config::processShortArgument in vendor/
squizlabs/ php_codesniffer/ src/ Config.php - Processes a short (-e) command line argument.
- Config::setCommandLineValues in vendor/
squizlabs/ php_codesniffer/ src/ Config.php - Set the command line values.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Config.php, line 1291
Class
- Config
- Stores the configuration used to run PHPCS and PHPCBF.
Namespace
PHP_CodeSnifferCode
public function processUnknownArgument($arg, $pos) {
// We don't know about any additional switches; just files.
if ($arg[0] === '-') {
if ($this->dieOnUnknownArg === false) {
return;
}
$error = "ERROR: option \"{$arg}\" not known" . PHP_EOL . PHP_EOL;
$error .= $this->printShortUsage(true);
throw new DeepExitException($error, 3);
}
$this->processFilePath($arg);
}