function Config::printConfigData
Prints out the gathered config data.
Parameters
array $data The config data to print.:
Return value
void
1 call to Config::printConfigData()
- Config::processLongArgument in vendor/
squizlabs/ php_codesniffer/ src/ Config.php - Processes a long (--example) command-line argument.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Config.php, line 1637
Class
- Config
- Stores the configuration used to run PHPCS and PHPCBF.
Namespace
PHP_CodeSnifferCode
public function printConfigData($data) {
$max = 0;
$keys = array_keys($data);
foreach ($keys as $key) {
$len = strlen($key);
if (strlen($key) > $max) {
$max = $len;
}
}
if ($max === 0) {
return;
}
$max += 2;
ksort($data);
foreach ($data as $name => $value) {
echo str_pad($name . ': ', $max) . $value . PHP_EOL;
}
}