Skip to content

Commit

Permalink
Display InsightClass also when Insight has no detail (#168)
Browse files Browse the repository at this point in the history
Display InsightClass also when Insight has no detail
  • Loading branch information
Jibbarth authored Jun 8, 2019
2 parents fa4aa30 + 98c9a01 commit afe7b32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Application/Console/Style.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,20 @@ public function issues(InsightCollection $insightCollection, array $metrics, str

$issue = "\n<fg=red>•</> [$category] <bold>{$insight->getTitle()}</bold>";

if (! $insight instanceof HasDetails) {
if (! $insight instanceof HasDetails && ! $this->output->isVerbose()) {
$this->writeln($issue);
continue;
}
$issue .= ':';
if ($this->output->isVerbose()) {
$issue .= " ({$insight->getInsightClass()})";
}

if (! $insight instanceof HasDetails) {
$this->writeln($issue);
continue;
}

$details = $insight->getDetails();
$totalDetails = count($details);

Expand Down

0 comments on commit afe7b32

Please sign in to comment.