function param_dump($_, $assoc_args)
{
$spec = \WP_CLI::get_configurator()->get_spec();
if (\WP_CLI\Utils\get_flag_value($assoc_args, 'with-values')) {
$config = \WP_CLI::get_configurator()->to_array();
// Copy current config values to $spec
foreach ($spec as $key => $value) {
if (isset($config[0][$key])) {
$current = $config[0][$key];
} else {
$current = NULL;
}
$spec[$key]['current'] = $current;
}
}
if ('var_export' === \WP_CLI\Utils\get_flag_value($assoc_args, 'format')) {
var_export($spec);
} else {
echo json_encode($spec);
}
}