Bug report
Just upgraded PHPStan from 1.8.10 to 1.9.0 (missed 1.8.11) and I get this new inspection in a swindow() function¹ :
Comparison operation ">" between 1 and int<1, max> is always false.
¹: window([1, 2, 3], width: 2); outputs [[1, 2], [2, 3]], only for streams instead of arrays
Code snippet that reproduces the problem
https://phpstan.org/r/1b6492a8-0d46-4789-824a-7e899d2c90c4
Expected output
No error, the return type of count() should be int<1, max> in this case (we know the array as at least one value, nothing more).
Did PHPStan help you today? Did it make you happy in any way?
Thanks a lot for all the hard work on this latest release!