psalm-plugin-phpunit icon indicating copy to clipboard operation
psalm-plugin-phpunit copied to clipboard

Incorrect line numbers for provider issues

Open AndrolGenhald opened this issue 3 years ago • 1 comments

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

AndrolGenhald avatar Feb 11 '22 18:02 AndrolGenhald

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..

Jean85 avatar Mar 18 '22 14:03 Jean85