when working with line numbers, one could easily do off-by-one errors because of assumptions about whether line numbers start at 0 or 1.
the added phpdocs make sure that static analysis, no matter whether phpstan or psalm, can detect errors like that. psalm will also work with these phpstan-prefixed phpdocs.
when working with line numbers, one could easily do off-by-one errors because of assumptions about whether line numbers start at
0
or1
.the added phpdocs make sure that static analysis, no matter whether phpstan or psalm, can detect errors like that. psalm will also work with these
phpstan
-prefixed phpdocs.