Bug report
I would have expected no errors in the code snippet below. If a $var is numeric I should be able to cast it to int, but it doesn't seem that phpstan recognizes this.
It works with is_scalar though.
Code snippet that reproduces the problem
https://phpstan.org/r/c684ee69-d6a4-4455-8d1f-82fd8ba46ae5
Expected output
No errors