Skip to content

Commit

Permalink
Merge pull request #37 from akeneo/enhance-dot-formater
Browse files Browse the repository at this point in the history
Enhance dot formatter
  • Loading branch information
jjanvier authored Mar 28, 2018
2 parents 8d4376c + a453512 commit 1bab14a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Akeneo/CouplingDetector/Formatter/Console/DotFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,21 @@ protected function outputPostRulesChecked(PostRulesCheckedEvent $event)
)
);

if ($this->violationsCount > 0) {
$this->output->writeln(sprintf('<broken-bg>%d coupling problems</broken-bg>', $this->violationsCount));
$this->output->writeln('');
$this->output->writeln('');

if (0 === $this->violationsCount) {
$this->output->write('<passed-bg>No coupling issues found </passed-bg>');
$this->output->write("<passed-bg>\xE2\x9C\x94</passed-bg>");
$this->output->write("<passed-bg>\xF0\x9F\x98\x83</passed-bg>");
$this->output->writeln("<passed-bg>\xF0\x9F\x8D\xBB</passed-bg>");
} else {
$this->output->write(
sprintf('<broken-bg>%d coupling issues found </broken-bg>', $this->violationsCount)
);
$this->output->write("<broken-bg>\xE2\x9C\x96</broken-bg>");
$this->output->write("<broken-bg>\xF0\x9F\x98\xA5</broken-bg>");
$this->output->writeln("<broken-bg>\xF0\x9F\x8D\x86</broken-bg>");
}
}

Expand Down

0 comments on commit 1bab14a

Please sign in to comment.