From a45351274cbe6bd264be578726814393afea88c3 Mon Sep 17 00:00:00 2001 From: "Julien Janvier (jjanvier)" Date: Wed, 28 Mar 2018 15:02:13 +0200 Subject: [PATCH] Enhance dot formatter --- .../Formatter/Console/DotFormatter.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Akeneo/CouplingDetector/Formatter/Console/DotFormatter.php b/src/Akeneo/CouplingDetector/Formatter/Console/DotFormatter.php index 3a3dc08..3da68a8 100644 --- a/src/Akeneo/CouplingDetector/Formatter/Console/DotFormatter.php +++ b/src/Akeneo/CouplingDetector/Formatter/Console/DotFormatter.php @@ -115,8 +115,21 @@ protected function outputPostRulesChecked(PostRulesCheckedEvent $event) ) ); - if ($this->violationsCount > 0) { - $this->output->writeln(sprintf('%d coupling problems', $this->violationsCount)); + $this->output->writeln(''); + $this->output->writeln(''); + + if (0 === $this->violationsCount) { + $this->output->write('No coupling issues found '); + $this->output->write("\xE2\x9C\x94"); + $this->output->write("\xF0\x9F\x98\x83"); + $this->output->writeln("\xF0\x9F\x8D\xBB"); + } else { + $this->output->write( + sprintf('%d coupling issues found ', $this->violationsCount) + ); + $this->output->write("\xE2\x9C\x96"); + $this->output->write("\xF0\x9F\x98\xA5"); + $this->output->writeln("\xF0\x9F\x8D\x86"); } }