Bug report
When using if (!isset($a['first_key']) && !isset($a['second_key'])) return;, phpstan refines first_key as not being optional in the array shape of $a after the early return
Code snippet that reproduces the problem
https://phpstan.org/r/292eadfe-27e6-4668-b7e5-ccc91c581290
Expected output
The array_key_exists call is not reported as useless by strict rules, because team_name can indeed be missing when reaching it.
Did PHPStan help you today? Did it make you happy in any way?