X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Ftranslation%2FMessageCatalogue.php;h=df917bbba9e346e55c3d91b7b43762a51b8995f6;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=73649fb6ddcaa44bac74a73a59d784e91bbc1f73;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/translation/MessageCatalogue.php b/vendor/symfony/translation/MessageCatalogue.php index 73649fb6d..df917bbba 100644 --- a/vendor/symfony/translation/MessageCatalogue.php +++ b/vendor/symfony/translation/MessageCatalogue.php @@ -12,10 +12,9 @@ namespace Symfony\Component\Translation; use Symfony\Component\Config\Resource\ResourceInterface; +use Symfony\Component\Translation\Exception\LogicException; /** - * MessageCatalogue. - * * @author Fabien Potencier */ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface @@ -28,8 +27,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf private $parent; /** - * Constructor. - * * @param string $locale The locale * @param array $messages An array of messages classified by domain */ @@ -143,7 +140,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf public function addCatalogue(MessageCatalogueInterface $catalogue) { if ($catalogue->getLocale() !== $this->locale) { - throw new \LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s"', $catalogue->getLocale(), $this->locale)); + throw new LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s"', $catalogue->getLocale(), $this->locale)); } foreach ($catalogue->all() as $domain => $messages) { @@ -169,14 +166,14 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf $c = $catalogue; while ($c = $c->getFallbackCatalogue()) { if ($c->getLocale() === $this->getLocale()) { - throw new \LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); } } $c = $this; do { if ($c->getLocale() === $catalogue->getLocale()) { - throw new \LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); } foreach ($catalogue->getResources() as $resource) {