Skip to content

Commit b0f83a9

Browse files
committed
TableErrorFormatter: visually differentiate phpstan assertion errors from rule errors
1 parent e6d9f0c commit b0f83a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Command/ErrorFormatter/TableErrorFormatter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use function count;
1414
use function explode;
1515
use function getenv;
16+
use function in_array;
1617
use function is_string;
1718
use function ltrim;
1819
use function sprintf;
@@ -117,6 +118,11 @@ public function formatErrors(
117118

118119
$message .= "\n✏️ <href=" . OutputFormatter::escape($url) . '>' . $title . '</>';
119120
}
121+
122+
if (in_array($error->getIdentifier(), ['phpstan.type', 'phpstan.nativeType', 'phpstan.variable'], true)) {
123+
$message = '<info>' . $message . '</info>';
124+
}
125+
120126
$rows[] = [
121127
$this->formatLineNumber($error->getLine()),
122128
$message,

0 commit comments

Comments
 (0)