$dieOnUnknownArg = true
[line 66]
Whether or not to kill the process when an unknown command line arg is found.
If FALSE, arguments that are not command line options or file/directory paths will be ignored and execution will continue.
$errorSeverity = 0
[line 49]
The minimum severity level errors must have to be displayed.
$values = array()
[line 42]
An array of all values specified on the command line.
$warningSeverity = 0
[line 56]
The minimum severity level warnings must have to be displayed.
checkRequirements [line 210]
array checkRequirements(
)
Exits if the minimum requirements of PHP_CodSniffer are not met.
explainStandard [line 904]
void explainStandard(
string
$standard)
Prints a report showing the sniffs contained in a standard.
Parameters:
string
$standard
—
The standard to validate.
getCommandLineValues [line 328]
array getCommandLineValues(
)
Gets the processed command line values.
If the values have not yet been set, the values will be sourced from the command line arguments.
getDefaults [line 231]
Get a list of default values for all possible command line arguments.
printErrorReport [line 803]
int printErrorReport(
PHP_CodeSniffer
$phpcs, array
$reports, bool
$showSources, string
$reportFile, int
$reportWidth)
Prints the error report for the run.
Note that this function may actually print multiple reports as the user may have specified a number of output formats.
- Return: The number of error and warning messages shown.
- Access: public
Parameters:
array
$reports
—
A list of reports to print.
bool
$showSources
—
TRUE if report should show error sources (not used by all reports).
string
$reportFile
—
A default file to log report output to.
int
$reportWidth
—
How wide the screen reports should be.
printInstalledStandards [line 1062]
void printInstalledStandards(
)
Prints out a list of installed coding standards.
printPHPCBFUsage [line 1023]
Prints out the usage information for PHPCBF.
printPHPCSUsage [line 974]
Prints out the usage information for PHPCS.
printUsage [line 958]
Prints out the usage information for the current script.
process [line 668]
int process(
[array
$values = array()])
Runs PHP_CodeSniffer over files and directories.
Parameters:
array
$values
—
An array of values determined from CLI args.
processLongArgument [line 472]
void processLongArgument(
string
$arg, int
$pos)
Processes a long (--example) command line argument.
Parameters:
string
$arg
—
The command line argument.
int
$pos
—
The position of the argument on the command line.
processShortArgument [line 405]
void processShortArgument(
string
$arg, int
$pos)
Processes a short (-e) command line argument.
Parameters:
string
$arg
—
The command line argument.
int
$pos
—
The position of the argument on the command line.
processUnknownArgument [line 642]
void processUnknownArgument(
string
$arg, int
$pos)
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.
runphpcbf [line 106]
runphpcs [line 81]
setCommandLineValues [line 356]
void setCommandLineValues(
array
$args)
Set the command line values.
Parameters:
array
$args
—
An array of command line arguments to process.
validateStandard [line 862]
array validateStandard(
array
$standards)
Convert the passed standards into valid standards.
Checks things like default values and case.
Parameters:
array
$standards
—
The standards to validate.