Permalink
Browse files

Fixed command output, fixes #161

  • Loading branch information...
1 parent b8720a6 commit 554132cffd4fe718e70091259a8f6d0edfe01f59 @willdurand willdurand committed Jun 23, 2012
Showing with 8 additions and 27 deletions.
  1. +1 −2 Command/AclInitCommand.php
  2. +2 −8 Command/FixturesLoadCommand.php
  3. +3 −7 Command/SqlBuildCommand.php
  4. +2 −10 Command/SqlInsertCommand.php
@@ -71,8 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
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');
@@ -197,11 +197,7 @@ protected function loadFixtures(InputInterface $input, OutputInterface $output,
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 @@ protected function insertSql($config, $sqlDir, $schemaDir, $output)
));
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);
@@ -79,13 +79,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}
- $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',
@@ -105,17 +105,9 @@ protected function doSqlInsert(\PropelSqlManager $manager, OutputInterface $outp
}
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>');
}
}

0 comments on commit 554132c

Please sign in to comment.