Skip to content

Commit 8f8a9cd

Browse files
jrfnlgrogy
authored andcommitted
ErrorFormatter: fix error msg on last line of code snippet
This small tweak makes the display of the error message independent of the code snippet implementation and will ensure that the actual error message is always displayed on the next line after the code snippet. Fixes 93
1 parent 403a912 commit 8f8a9cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ErrorFormatter.php

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function formatSyntaxErrorMessage(SyntaxError $error, $withCodeSnipped =
6060
} else {
6161
$string .= $this->getCodeSnippet($error->getFilePath(), $onLine);
6262
}
63+
$string = rtrim($string) . PHP_EOL;
6364
}
6465
}
6566

0 commit comments

Comments
 (0)