Skip to content

Commit 05cf667

Browse files
committed
Fix RawTextErrorFormatter
1 parent 64e5f14 commit 05cf667

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ErrorFormatter/RawTextErrorFormatter.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ public function formatErrors(
1515
Output $output
1616
): int {
1717
foreach ($analysisResult->getNotFileSpecificErrors() as $notFileSpecificError) {
18-
$output->writeRaw('<fg=red>ERROR</>: ');
19-
$output->writeRaw($notFileSpecificError);
18+
$output->writeFormatted('<fg=red>ERROR</>: ');
19+
$output->writeLineFormatted($notFileSpecificError);
2020
}
2121

2222
foreach ($analysisResult->getFileSpecificErrors() as $error) {
23-
$output->writeRaw('<fg=red>ERROR</>: ');
24-
$output->writeRaw(
23+
$output->writeFormatted('<fg=red>ERROR</>: ');
24+
$output->writeLineFormatted(
2525
sprintf('%s in %s:%d', $error->getMessage(), $error->getFile() ?? '', $error->getLine())
2626
);
2727
}
2828

2929
foreach ($analysisResult->getWarnings() as $warning) {
30-
$output->writeRaw('<fg=yellow>WARNING</>: ');
31-
$output->writeRaw($warning);
30+
$output->writeFormatted('<fg=yellow>WARNING</>: ');
31+
$output->writeLineFormatted($warning);
3232
}
3333

3434

0 commit comments

Comments
 (0)