upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -23,34 +23,19 @@ use Symfony\Component\Translation\MessageCatalogue;
*/
class TranslationWriter implements TranslationWriterInterface
{
/**
* @var array<string, DumperInterface>
*/
private $dumpers = [];
/**
* Adds a dumper to the writer.
*
* @param string $format The format of the dumper
*/
public function addDumper($format, DumperInterface $dumper)
public function addDumper(string $format, DumperInterface $dumper)
{
$this->dumpers[$format] = $dumper;
}
/**
* Disables dumper backup.
*
* @deprecated since Symfony 4.1
*/
public function disableBackup()
{
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), \E_USER_DEPRECATED);
foreach ($this->dumpers as $dumper) {
if (method_exists($dumper, 'setBackup')) {
$dumper->setBackup(false);
}
}
}
/**
* Obtains the list of supported formats.
*
@@ -69,7 +54,7 @@ class TranslationWriter implements TranslationWriterInterface
*
* @throws InvalidArgumentException
*/
public function write(MessageCatalogue $catalogue, $format, $options = [])
public function write(MessageCatalogue $catalogue, string $format, array $options = [])
{
if (!isset($this->dumpers[$format])) {
throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));

View File

@@ -29,5 +29,5 @@ interface TranslationWriterInterface
*
* @throws InvalidArgumentException
*/
public function write(MessageCatalogue $catalogue, $format, $options = []);
public function write(MessageCatalogue $catalogue, string $format, array $options = []);
}