comparison vendor/symfony/translation/Dumper/YamlFileDumper.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
9 * file that was distributed with this source code. 9 * file that was distributed with this source code.
10 */ 10 */
11 11
12 namespace Symfony\Component\Translation\Dumper; 12 namespace Symfony\Component\Translation\Dumper;
13 13
14 use Symfony\Component\Translation\Exception\LogicException;
14 use Symfony\Component\Translation\MessageCatalogue; 15 use Symfony\Component\Translation\MessageCatalogue;
15 use Symfony\Component\Translation\Util\ArrayConverter; 16 use Symfony\Component\Translation\Util\ArrayConverter;
16 use Symfony\Component\Yaml\Yaml; 17 use Symfony\Component\Yaml\Yaml;
17 use Symfony\Component\Translation\Exception\LogicException;
18 18
19 /** 19 /**
20 * YamlFileDumper generates yaml files from a message catalogue. 20 * YamlFileDumper generates yaml files from a message catalogue.
21 * 21 *
22 * @author Michel Salib <michelsalib@hotmail.com> 22 * @author Michel Salib <michelsalib@hotmail.com>
31 } 31 }
32 32
33 /** 33 /**
34 * {@inheritdoc} 34 * {@inheritdoc}
35 */ 35 */
36 public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) 36 public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = [])
37 { 37 {
38 if (!class_exists('Symfony\Component\Yaml\Yaml')) { 38 if (!class_exists('Symfony\Component\Yaml\Yaml')) {
39 throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); 39 throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.');
40 } 40 }
41 41