Skip to content

Commit afe7b32

Browse files
authored
Display InsightClass also when Insight has no detail (#168)
Display InsightClass also when Insight has no detail
2 parents fa4aa30 + 98c9a01 commit afe7b32

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Application/Console/Style.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,20 @@ public function issues(InsightCollection $insightCollection, array $metrics, str
225225

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

228-
if (! $insight instanceof HasDetails) {
228+
if (! $insight instanceof HasDetails && ! $this->output->isVerbose()) {
229229
$this->writeln($issue);
230230
continue;
231231
}
232232
$issue .= ':';
233233
if ($this->output->isVerbose()) {
234234
$issue .= " ({$insight->getInsightClass()})";
235235
}
236+
237+
if (! $insight instanceof HasDetails) {
238+
$this->writeln($issue);
239+
continue;
240+
}
241+
236242
$details = $insight->getDetails();
237243
$totalDetails = count($details);
238244

0 commit comments

Comments
 (0)