protected function execute(InputInterface $input, OutputInterface $output)
{
$command = "php '" . PIWIK_INCLUDE_PATH . "/tests/travis/generator/main.php' generate:travis-yml ";
foreach ($input->getOptions() as $name => $value) {
if ($value === false || $value === null) {
continue;
}
if ($value === true) {
$command .= " --{$name}";
} else {
if (is_array($value)) {
foreach ($value as $arrayValue) {
$command .= " --{$name}=\"" . addslashes($arrayValue) . "\"";
}
} else {
$command .= " --{$name}=\"" . addslashes($value) . "\"";
}
}
}
passthru($command, $returnCode);
return $returnCode;
}