Bug report
A property of type ?T[] can have any value assigned to it regardless of type without causing a type checking error.
Code snippet that reproduces the problem
https://phpstan.org/r/53a657a5-2847-4df6-84d1-7c209839dc6f
Expected output
Type errors on lines 13 and 15.
Did PHPStan help you today? Did it make you happy in any way?
Yes, I'm using it in a current project.