mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-30 05:03:23 +00:00
[Web] Update composer libraries
This commit is contained in:
1297 files changed
+71585
-24460
No files matched your search
@@ -30,10 +30,8 @@ class TranslationWriter implements TranslationWriterInterface
|
||||
|
||||
/**
|
||||
* Adds a dumper to the writer.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addDumper(string $format, DumperInterface $dumper)
|
||||
public function addDumper(string $format, DumperInterface $dumper): void
|
||||
{
|
||||
$this->dumpers[$format] = $dumper;
|
||||
}
|
||||
@@ -52,21 +50,19 @@ class TranslationWriter implements TranslationWriterInterface
|
||||
* @param string $format The format to use to dump the messages
|
||||
* @param array $options Options that are passed to the dumper
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function write(MessageCatalogue $catalogue, string $format, array $options = [])
|
||||
public function write(MessageCatalogue $catalogue, string $format, array $options = []): void
|
||||
{
|
||||
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']));
|
||||
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0o777, true) && !is_dir($options['path'])) {
|
||||
throw new RuntimeException(\sprintf('Translation Writer was not able to create directory "%s".', $options['path']));
|
||||
}
|
||||
|
||||
// save
|
||||
|
||||
+1
-3
@@ -27,9 +27,7 @@ interface TranslationWriterInterface
|
||||
* @param string $format The format to use to dump the messages
|
||||
* @param array $options Options that are passed to the dumper
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function write(MessageCatalogue $catalogue, string $format, array $options = []);
|
||||
public function write(MessageCatalogue $catalogue, string $format, array $options = []): void;
|
||||
}
|
||||
Reference in new issue
Block a user