sirbrillig / phpcs-variable-analysis

Find undefined and unused variables with the PHP Codesniffer static analysis tool.
Other
136 stars 14 forks source link

Undefined variable error introduced in v2.11.15 #300

Closed srtfisher closed 1 year ago

srtfisher commented 1 year ago

Hi 👋

I happened to upgrade to v2.11.15 just now and PHPCS is reporting an undefined variable for case where a variable is defined. Here's an example:

https://gist.github.com/srtfisher/920bdcbfc4acde5b4c2bb17c9d3f5d30

In that gist L20 only throws the error. It seems defined on L18 and L23.

Thank you!

sirbrillig commented 1 year ago

ah, TIL that arrow functions can contain newlines. whoops. Should be fixed shortly.

srtfisher commented 1 year ago

Thank you!