Reports an array that does not provide all the required keys/entries defined in the array shape.
This inspection helps you identify the scenarios when an array instantiation might lead to runtime issues due to missing required entries, ensuring better code consistency and adherence to the defined structure.
Embed code snippets:
function connect(#[ArrayShape([
'path' => 'string',
'host' => [
'name' => 'string',
'port' => 'int'
]
])] array $options = []) { };
connect(['host' => ['name' => 'localhost', 'port' => 1234]]); // Missing 'path' key