Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Command/ErrorFormatter/TableErrorFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use function count;
use function explode;
use function getenv;
use function in_array;
use function is_string;
use function ltrim;
use function sprintf;
Expand Down Expand Up @@ -117,6 +118,14 @@ public function formatErrors(

$message .= "\n✏️ <href=" . OutputFormatter::escape($url) . '>' . $title . '</>';
}

if (
$error->getIdentifier() !== null
&& in_array($error->getIdentifier(), ['phpstan.type', 'phpstan.nativeType', 'phpstan.variable', 'phpstan.dumpType', 'phpstan.unknownExpectation'], true)
) {
$message = '<fg=red>' . $message . '</>';
}

$rows[] = [
$this->formatLineNumber($error->getLine()),
$message,
Expand Down
Loading