summaryrefslogtreecommitdiff
path: root/vendor/symfony/translation/Util
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/translation/Util')
-rw-r--r--vendor/symfony/translation/Util/ArrayConverter.php4
-rw-r--r--vendor/symfony/translation/Util/XliffUtils.php8
2 files changed, 6 insertions, 6 deletions
diff --git a/vendor/symfony/translation/Util/ArrayConverter.php b/vendor/symfony/translation/Util/ArrayConverter.php
index e8b7559dfb..0276294f62 100644
--- a/vendor/symfony/translation/Util/ArrayConverter.php
+++ b/vendor/symfony/translation/Util/ArrayConverter.php
@@ -27,7 +27,7 @@ class ArrayConverter
{
/**
* Converts linear messages array to tree-like array.
- * For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')).
+ * For example this rray('foo.bar' => 'value') will be converted to ['foo' => ['bar' => 'value']].
*
* @param array $messages Linear messages array
*
@@ -35,7 +35,7 @@ class ArrayConverter
*/
public static function expandToTree(array $messages)
{
- $tree = array();
+ $tree = [];
foreach ($messages as $id => $value) {
$referenceToElement = &self::getElementByPath($tree, explode('.', $id));
diff --git a/vendor/symfony/translation/Util/XliffUtils.php b/vendor/symfony/translation/Util/XliffUtils.php
index 9f024e5985..3ace285bfa 100644
--- a/vendor/symfony/translation/Util/XliffUtils.php
+++ b/vendor/symfony/translation/Util/XliffUtils.php
@@ -77,7 +77,7 @@ class XliffUtils
libxml_clear_errors();
libxml_use_internal_errors($internalErrors);
- return array();
+ return [];
}
public static function getErrorsAsString(array $xmlErrors): string
@@ -143,16 +143,16 @@ class XliffUtils
*/
private static function getXmlErrors(bool $internalErrors): array
{
- $errors = array();
+ $errors = [];
foreach (libxml_get_errors() as $error) {
- $errors[] = array(
+ $errors[] = [
'level' => LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR',
'code' => $error->code,
'message' => trim($error->message),
'file' => $error->file ?: 'n/a',
'line' => $error->line,
'column' => $error->column,
- );
+ ];
}
libxml_clear_errors();