X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fserializer%2FMapping%2FLoader%2FYamlFileLoader.php;fp=vendor%2Fsymfony%2Fserializer%2FMapping%2FLoader%2FYamlFileLoader.php;h=ca9d43e15b7939ba3e87c268272a9734b87c473b;hp=e3afa4763271e693081947af0b4937b493a22c30;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php b/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php index e3afa4763..ca9d43e15 100644 --- a/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php +++ b/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php @@ -30,7 +30,7 @@ class YamlFileLoader extends FileLoader * * @var array */ - private $classes = null; + private $classes; /** * {@inheritdoc} @@ -51,7 +51,7 @@ class YamlFileLoader extends FileLoader $yaml = $this->classes[$classMetadata->getName()]; - if (isset($yaml['attributes']) && is_array($yaml['attributes'])) { + if (isset($yaml['attributes']) && \is_array($yaml['attributes'])) { $attributesMetadata = $classMetadata->getAttributesMetadata(); foreach ($yaml['attributes'] as $attribute => $data) { @@ -63,12 +63,12 @@ class YamlFileLoader extends FileLoader } if (isset($data['groups'])) { - if (!is_array($data['groups'])) { + if (!\is_array($data['groups'])) { throw new MappingException(sprintf('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); } foreach ($data['groups'] as $group) { - if (!is_string($group)) { + if (!\is_string($group)) { throw new MappingException(sprintf('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); } @@ -113,13 +113,13 @@ class YamlFileLoader extends FileLoader $this->yamlParser = new Parser(); } - $classes = $this->yamlParser->parse(file_get_contents($this->file)); + $classes = $this->yamlParser->parseFile($this->file); if (empty($classes)) { return array(); } - if (!is_array($classes)) { + if (!\is_array($classes)) { throw new MappingException(sprintf('The file "%s" must contain a YAML array.', $this->file)); }