Ran into a weird issue using this plugin. Not entirely sure whether it is actually caused by this library. When I attempt to run collect() on the value that resides in the request, I get an error that the array type is not accepted which makes zero sense to me.
The weird thing is, the inferred type should be accepted. When I instantiate a new variable and explicitly give it this type, PHPStan returns no errors:
Ran into a weird issue using this plugin. Not entirely sure whether it is actually caused by this library. When I attempt to run
collect()
on the value that resides in the request, I get an error that the array type is not accepted which makes zero sense to me.The weird thing is, the inferred type should be accepted. When I instantiate a new variable and explicitly give it this type, PHPStan returns no errors:
I have no clue why the former code fragment displays and error but the latter does not. I figured there might be a small bug in the type inference.
Using PHPStan level 9