with this plugin, phpstan should be aware about the array shape of the variable involved:
/**
* @param array{password: mixed, email: mixed} $arr
*/
function a($arr) {
}
$data = $_POST;
Assert::keyExists($data, 'password');
Assert::keyExists($data, 'email');
a($data);
it would be even better if we could verify that the keys are of a certain type, e.g. string in my above example.
though it seems this is not even possible with Assert itself, without additional asserts.