psalm / psalm-plugin-phpunit

A PHPUnit plugin for Psalm
77 stars 33 forks source link

Incorrect line numbers for provider issues #117

Open AndrolGenhald opened 2 years ago

AndrolGenhald commented 2 years ago

The provider docblock line is set here, but $line is actually the byte offset in the file, not the line number.

Jean85 commented 2 years ago

From what I can see with a rapid var_dump, $provider_docblock_location->raw_line_number contains already the correct line for the provider method; but there's no reference to include the (eventually present) method dockblock, which that call probably attempts to set.

I would simply suppress that call, since having a totally wrong line number is worst that having a preview of the code snippet without the docblock..