#10714·phpstan

Reports wrong line number

Author: GrldkCreated Mar 13, 2024Updated Sep 30, 2026
Labelsfeature-request

Bug report

This confused me for a second. Am working on some string concat work, spanning multiple lines for clarity, and phpstan reported an error on the wrong line.

Code snippet that reproduces the problem

https://phpstan.org/r/61e784bb-c03a-4ba3-91b1-47c43d01ca2e

Expected output

Phpstan reports an error on line 15, but should report it on line 16.

Did PHPStan help you today? Did it make you happy in any way?

Phpstan really helps clean up our code, thanks!