vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.56k stars 660 forks source link

Fails to recognize UnusedMethodCall when calling pure method statically #5522

Open still-dreaming-1 opened 3 years ago

still-dreaming-1 commented 3 years ago

https://psalm.dev/r/8625db4b1b

At first I thought I was getting a false positive, but I guess it's the other way around.

psalm-github-bot[bot] commented 3 years ago

I found these snippets:

https://psalm.dev/r/8625db4b1b ```php addOne(2); ``` ``` Psalm output (using commit 3ce41d7): ERROR: UnusedMethodCall - 18:14 - The call to Math::addOne is not used ```