Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / translation / Writer / TranslationWriter.php
index 2f5eaa1edf0d62674cecc821911429db59ad8881..901a8894e1c4cf7dfbf2b0a8c1f498b32d53da97 100644 (file)
@@ -13,6 +13,8 @@ namespace Symfony\Component\Translation\Writer;
 
 use Symfony\Component\Translation\MessageCatalogue;
 use Symfony\Component\Translation\Dumper\DumperInterface;
+use Symfony\Component\Translation\Exception\InvalidArgumentException;
+use Symfony\Component\Translation\Exception\RuntimeException;
 
 /**
  * TranslationWriter writes translation messages.
@@ -68,19 +70,19 @@ class TranslationWriter
      * @param string           $format    The format to use to dump the messages
      * @param array            $options   Options that are passed to the dumper
      *
-     * @throws \InvalidArgumentException
+     * @throws InvalidArgumentException
      */
     public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array())
     {
         if (!isset($this->dumpers[$format])) {
-            throw new \InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));
+            throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));
         }
 
         // get the right dumper
         $dumper = $this->dumpers[$format];
 
         if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) {
-            throw new \RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path']));
+            throw new RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path']));
         }
 
         // save