Report useless return values of function calls#3225
Report useless return values of function calls#3225ondrejmirtes merged 12 commits intophpstan:1.11.xfrom
Conversation
e594397 to
34336f3
Compare
|
This pull request has been marked as ready for review. |
ondrejmirtes
left a comment
There was a problem hiding this comment.
Separate rule please. Same level the void usage is reported (not sure from the top of my head).
its a level 0 error: https://phpstan.org/r/42b76642-82b2-422a-bd7d-f3678eb6e1b0 |
3d864f7 to
51d7783
Compare
|
I have no idea why the PHP7.2 build fails with a "risky error". maybe its related that I ran the levels-tests on a windows machine. |
There was a problem hiding this comment.
This isn't how to make test for >= 80000 only. You need to call markTestSkipped. See many examples in other tests. This is why it's marked as risky.
There was a problem hiding this comment.
ouch. great catch, thanks.
There was a problem hiding this comment.
Please put () after %s. So that it's print_r() and not just print_r.
This reverts commit 51d77837680354b704b9f419358f79ebe58e6b2e.
|
in phpstorm stubs I found another function alias worth reporting: show_source() |
|
just realized the PrestaShop/PrestaShop shows 5 real world errors this rule is targetting, simlar to the one of my initial report 💪 |
|
Nice! I really like this addition. |
|
Thank you. |
closes phpstan/phpstan#11320