Here's the code:
<?php declare(strict_types=1);
/**
* @param array{key?: string} $options
*/
function hello($options)
{
var_dump($options);
}
hello([
'WRONG_KEY' => '...',
]);
I would expect phpstan analyze to fail on this code, complaining about unexpected WRONG_KEY in the passed array.
Why it's not failing? Do I miss some configuration or is it how PHPStan supposed to work?