-
-
Notifications
You must be signed in to change notification settings - Fork 933
Open
Labels
Milestone
Description
Bug report
You need to set rememberPossiblyImpureFunctionValues: false and phpstan will report about error. Please not that max(0, $number) works fine, but max(0, HelloWorld::getNumber()) not.
Code snippet that reproduces the problem
https://phpstan.org/r/9a0bea76-ab41-4d2e-bea0-d3bad33c3b41
Actual output
------ ----------------------------------------------------------------------------------------------
Line bug.php
------ ----------------------------------------------------------------------------------------------
21 Parameter #1 $number of static method HelloWorld::sayHello() expects int<0, max>, int given.
------ ----------------------------------------------------------------------------------------------
Expected output
no errors