Back to GetConfigurationCommand class

Method formatConfig

public array
formatConfig
(array $configs)
Formats the configuration array into desired format
Parameters
  • array $configs Array of the configurations
Returns
  • array
Since
  • 4.0.0

Method formatConfig - Source code

/**
 * Formats the configuration array into desired format
 *
 * @param   array  $configs  Array of the configurations
 *
 * @return array
 *
 * @since 4.0.0
 */
public function formatConfig(array $configs) : array
{
    $newConfig = [];
    foreach ($configs as $key => $config) {
        $config = $config === false ? "false" : $config;
        $config = $config === true ? "true" : $config;
        if (!in_array($key, ['cwd', 'execution'])) {
            $newConfig[$key] = $config;
        }
    }
    return $newConfig;
}