Open
Description
Bug report
A bug hit production for us when we were generating some data to send to an api, the code is something like this
$data[] = [
// ...
'ethnicity' -> $learner->ethnicity
];
PHPStan doesn't catch this. Is it possible for PHPStan to catch it?
Code snippet that reproduces the problem
https://phpstan.org/r/ea95c392-9f23-484d-a87a-fb0d106559d5
Expected output
PHPStan should complain about accessing properties on a string
Did PHPStan help you today? Did it make you happy in any way?
It's been a godsend for us here, thank you for working on it!