protected function mergeSchemaObjectArrays($parent, $schema)
{
// Directives used that exist in the schema being extended, that are arrays, should be merged.
foreach (array_intersect_key($schema, $parent) as $key => $value) {
if (is_array($value)) {
$schema[$key] = array_merge_recursive($parent[$key], $value);
}
}
// Directives in the parent that have not been defined should be added.
return array_replace($schema, array_diff_key($parent, $schema));
}