You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
False positive for preInc.unused after upgrading to 2.3.0 #15411
When using ++ as a unary pre operator, then PHPStan seems to disregard the actual return value if its used in a context where a return value makes sense, e.g. a return value, function call, ...
Thanks for the clear reproducer! I submitted phpstan/phpstan-src#6692, covering consumed prefix increments/decrements and their native-engine counterparts with regression tests.
Activity
drewmt commentedon Oct 6, 2026
Thanks for the clear reproducer! I submitted phpstan/phpstan-src#6692, covering consumed prefix increments/decrements and their native-engine counterparts with regression tests.
kallesommernielsen commentedon Oct 6, 2026
Thank you @drewmt! The patch looks pretty straight forward, fingers crossed it gets approved :)