Fixed the code showing the position of the lexer

The PHP code had an off-by-1 error compared to the ported JS code, causing a str_repeat with a -1 length when the previous line is empty.
Fixes https://github.com/composer/composer/issues/3151