Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
75 $attributeMetadata->addGroup($group); | 75 $attributeMetadata->addGroup($group); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 if (isset($data['max_depth'])) { | 79 if (isset($data['max_depth'])) { |
80 if (!is_int($data['max_depth'])) { | 80 if (!\is_int($data['max_depth'])) { |
81 throw new MappingException(sprintf('The "max_depth" value must be an integer in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); | 81 throw new MappingException(sprintf('The "max_depth" value must be an integer in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); |
82 } | 82 } |
83 | 83 |
84 $attributeMetadata->setMaxDepth($data['max_depth']); | 84 $attributeMetadata->setMaxDepth($data['max_depth']); |
85 } | 85 } |
114 } | 114 } |
115 | 115 |
116 $classes = $this->yamlParser->parseFile($this->file); | 116 $classes = $this->yamlParser->parseFile($this->file); |
117 | 117 |
118 if (empty($classes)) { | 118 if (empty($classes)) { |
119 return array(); | 119 return []; |
120 } | 120 } |
121 | 121 |
122 if (!\is_array($classes)) { | 122 if (!\is_array($classes)) { |
123 throw new MappingException(sprintf('The file "%s" must contain a YAML array.', $this->file)); | 123 throw new MappingException(sprintf('The file "%s" must contain a YAML array.', $this->file)); |
124 } | 124 } |