$dieOnUnknownArg =
[line 139]
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.
__construct (Constructor) [line 278]
void __construct(
[array
$cliArgs = array()], [bool
$dieOnUnknownArg = true])
Creates a Config object and populates it with command line values.
Parameters:
array
$cliArgs
—
An array of values gathered from CLI args.
bool
$dieOnUnknownArg
—
Whether or not to kill the process when an unknown command line arg is found.
getAllConfigData [line 1337]
Get all config data.
- Return: string>
- See: getConfigData()
- Access: public
getConfigData [line 1216]
string|null getConfigData(
string
$key)
Get a single config value.
- See: setConfigData()
- See: getAllConfigData()
- Access: public
Parameters:
string
$key
—
The name of the config value.
getExecutablePath [line 1241]
string|null getExecutablePath(
string
$name)
Get the path to an executable utility.
- See: getConfigData()
- Access: public
Parameters:
string
$name
—
The name of the executable utility.
printConfigData [line 1367]
void printConfigData(
array
$data)
Prints out the gathered config data.
Parameters:
array
$data
—
The config data to print.
printPHPCBFUsage [line 1172]
Prints out the usage information for PHPCBF.
printPHPCSUsage [line 1109]
Prints out the usage information for PHPCS.
printUsage [line 1093]
Prints out the usage information for this script.
processLongArgument [line 624]
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 528]
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 1051]
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.
restoreDefaults [line 401]
Restore default values for all possible command line arguments.
setCommandLineValues [line 352]
void setCommandLineValues(
array
$args)
Set the command line values.
Parameters:
array
$args
—
An array of command line arguments to set.
setConfigData [line 1284]
bool setConfigData(
string
$key, string|null
$value, [boolean
$temp = false])
Set a single config value.
- See: getConfigData()
- Throws: RuntimeException If the config file can not be written.
- Access: public
Parameters:
string
$key
—
The name of the config value.
string|null
$value
—
The value to set. If null, the config entry is deleted, reverting it to the default value.
boolean
$temp
—
Set this config data temporarily for this script run. This will not write the config data to the config file.
__get [line 178]
mixed __get(
string
$name)
Get the value of an inaccessible property.
- Throws: RuntimeException If the setting name is invalid.
- Access: public
Parameters:
string
$name
—
The name of the property.
__isset [line 248]
bool __isset(
string
$name)
Check if the value of an inaccessible property is set.
Parameters:
string
$name
—
The name of the property.
__set [line 198]
void __set(
string
$name, mixed
$value)
Set the value of an inaccessible property.
- Throws: RuntimeException If the setting name is invalid.
- Access: public
Parameters:
string
$name
—
The name of the property.
mixed
$value
—
The value of the property.
__unset [line 262]
void __unset(
string
$name)
Unset the value of an inaccessible property.
Parameters:
string
$name
—
The name of the property.