$dieOnUnknownArg =
[line 147]
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. These values will be stored in $this->unknown.
__construct (Constructor) [line 319]
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 1599]
Get all config data.
- Return: string>
- See: getConfigData()
- Access: public
getConfigData [line 1457]
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 1482]
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.
getSettings [line 289]
Get the array of all config settings.
- Return: mixed>
- Access: public
printConfigData [line 1646]
void printConfigData(
array
$data)
Prints out the gathered config data.
Parameters:
array
$data
—
The config data to print.
printPHPCBFUsage [line 1401]
Prints out the usage information for PHPCBF.
printPHPCSUsage [line 1328]
Prints out the usage information for PHPCS.
printShortUsage [line 1304]
string|void printShortUsage(
[bool
$return = false])
Prints out the short usage information for this script.
Parameters:
bool
$return
—
If TRUE, the usage string is returned instead of output to screen.
printUsage [line 1281]
Prints out the usage information for this script.
processFilePath [line 1250]
void processFilePath(
string
$path)
Processes a file path and add it to the file list.
Parameters:
string
$path
—
The path to the file to add.
processLongArgument [line 679]
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 575]
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 1225]
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 445]
Restore default values for all possible command line arguments.
setCommandLineValues [line 396]
void setCommandLineValues(
array
$args)
Set the command line values.
Parameters:
array
$args
—
An array of command line arguments to set.
setConfigData [line 1525]
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.
setSettings [line 303]
Set the array of all config settings.
Parameters:
array$settings
—
mixed> $settings The array of config settings.
__get [line 193]
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 263]
bool __isset(
string
$name)
Check if the value of an inaccessible property is set.
Parameters:
string
$name
—
The name of the property.
__set [line 213]
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 277]
void __unset(
string
$name)
Unset the value of an inaccessible property.
Parameters:
string
$name
—
The name of the property.