$this->children
[$name] =
$node;
} /**
* @throws UnsetKeyException
* @throws InvalidConfigurationException if the node doesn't have enough children
*/
protected function finalizeValue(mixed
$value): mixed
{ if (false ===
$value) { throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s.',
$this->
getPath(),
json_encode($value)));
} foreach ($this->children
as $name =>
$child) { if (!\
array_key_exists($name,
$value)) { if ($child->
isRequired()) { $message =
sprintf('The child config "%s" under "%s" must be configured',
$name,
$this->
getPath());
if ($child->
getInfo()) { $message .=
sprintf(': %s',
$child->
getInfo());
} else { $message .= '.';
}