Fixed command output, fixes #161

This commit is contained in:
William DURAND 2012-06-24 01:09:07 +02:00
parent b8720a62e5
commit 554132cffd
4 changed files with 8 additions and 27 deletions

View file

@ -71,8 +71,7 @@ EOT
if (true == $result = $this->callPhing('build-sql', array('propel.sql.dir' => $sqlDirectory))) {
$this->writeSection(
$output,
'<comment>1</comment> <info>SQL file has been generated.</info>',
'bg=black'
'<comment>1</comment> <info>SQL file has been generated.</info>'
);
} else {
$this->writeTaskError($output, 'build-sql');

View file

@ -197,11 +197,7 @@ EOT
return false;
}
$this->writeSection(
$output,
sprintf('<comment>%s</comment> %s fixtures file%s loaded.', $nb, strtoupper($type), $nb > 1 ? 's' : ''),
'fg=white;bg=black'
);
$output->writeln(sprintf('<comment>%s</comment> %s fixtures file%s loaded.', $nb, strtoupper($type), $nb > 1 ? 's' : ''));
return true;
}
@ -279,9 +275,7 @@ EOT
));
if (true === $ret) {
$this->writeSection($output, array(
'', 'All SQL statements have been inserted.'
), 'fg=green;bg=black');
$output->writeln('All SQL statements have been inserted.');
} else {
$this->writeTaskError($output, 'insert-sql', false);

View file

@ -79,13 +79,9 @@ EOT
}
}
$this->writeSection(
$output,
sprintf('<comment>%d</comment> <info>SQL file%s ha%s been generated.</info>',
$nbFiles, $nbFiles > 1 ? 's' : '', $nbFiles > 1 ? 've' : 's'
),
'bg=black'
);
$output->writeln(sprintf('<comment>%d</comment> <info>SQL file%s ha%s been generated.</info>',
$nbFiles, $nbFiles > 1 ? 's' : '', $nbFiles > 1 ? 've' : 's'
));
} else {
$this->writeSection($output, array(
'[Propel] Error',

View file

@ -105,17 +105,9 @@ EOT
}
if (true === $statusCode) {
$this->writeSection(
$output,
'<info>All SQL statements have been inserted.</info>',
'bg=black'
);
$output->writeln('<info>All SQL statements have been inserted.</info>');
} else {
$this->writeSection(
$output,
'<comment>No SQL statements found.</comment>',
'bg=black'
);
$output->writeln('<comment>No SQL statements found.</comment>');
}
}