updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -23,13 +23,12 @@ use Symfony\Component\Translation\MessageCatalogue;
*/
class TranslationWriter implements TranslationWriterInterface
{
private $dumpers = array();
private $dumpers = [];
/**
* Adds a dumper to the writer.
*
* @param string $format The format of the dumper
* @param DumperInterface $dumper The dumper
* @param string $format The format of the dumper
*/
public function addDumper($format, DumperInterface $dumper)
{
@@ -43,7 +42,7 @@ class TranslationWriter implements TranslationWriterInterface
*/
public function disableBackup()
{
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
@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')) {
@@ -65,13 +64,12 @@ class TranslationWriter implements TranslationWriterInterface
/**
* Writes translation from the catalogue according to the selected format.
*
* @param MessageCatalogue $catalogue The message catalogue to write
* @param string $format The format to use to dump the messages
* @param array $options Options that are passed to the dumper
* @param string $format The format to use to dump the messages
* @param array $options Options that are passed to the dumper
*
* @throws InvalidArgumentException
*/
public function write(MessageCatalogue $catalogue, $format, $options = array())
public function write(MessageCatalogue $catalogue, $format, $options = [])
{
if (!isset($this->dumpers[$format])) {
throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));
@@ -81,7 +79,7 @@ class TranslationWriter implements TranslationWriterInterface
$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

View File

@@ -24,11 +24,10 @@ interface TranslationWriterInterface
/**
* Writes translation from the catalogue according to the selected format.
*
* @param MessageCatalogue $catalogue The message catalogue to write
* @param string $format The format to use to dump the messages
* @param array $options Options that are passed to the dumper
* @param string $format The format to use to dump the messages
* @param array $options Options that are passed to the dumper
*
* @throws InvalidArgumentException
*/
public function write(MessageCatalogue $catalogue, $format, $options = array());
public function write(MessageCatalogue $catalogue, $format, $options = []);
}