function YamlFileLoader::validateAttributes
2 calls to YamlFileLoader::validateAttributes()
- YamlFileLoader::parseDefaults in vendor/
symfony/ dependency-injection/ Loader/ YamlFileLoader.php - YamlFileLoader::parseDefinition in vendor/
symfony/ dependency-injection/ Loader/ YamlFileLoader.php
File
-
vendor/
symfony/ dependency-injection/ Loader/ YamlFileLoader.php, line 982
Class
- YamlFileLoader
- YamlFileLoader loads YAML files service definitions.
Namespace
Symfony\Component\DependencyInjection\LoaderCode
private function validateAttributes(string $message, array $attributes, array $path = []) : void {
foreach ($attributes as $name => $value) {
if (\is_array($value)) {
$this->validateAttributes($message, $value, [
$path,
$name,
]);
}
elseif (!\is_scalar($value ?? '')) {
$name = implode('.', [
$path,
$name,
]);
throw new InvalidArgumentException(\sprintf($message, $name));
}
}
}