diff options
Diffstat (limited to 'vendor/symfony/translation/Loader/XliffFileLoader.php')
| -rw-r--r-- | vendor/symfony/translation/Loader/XliffFileLoader.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/symfony/translation/Loader/XliffFileLoader.php b/vendor/symfony/translation/Loader/XliffFileLoader.php index 1106ec65f0..99306b86b1 100644 --- a/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -97,13 +97,13 @@ class XliffFileLoader implements LoaderInterface $catalogue->set((string) $source, $target, $domain); - $metadata = array(); + $metadata = []; if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) { $metadata['notes'] = $notes; } if (isset($translation->target) && $translation->target->attributes()) { - $metadata['target-attributes'] = array(); + $metadata['target-attributes'] = []; foreach ($translation->target->attributes() as $key => $value) { $metadata['target-attributes'][$key] = (string) $value; } @@ -134,18 +134,18 @@ class XliffFileLoader implements LoaderInterface $catalogue->set((string) $source, $target, $domain); - $metadata = array(); + $metadata = []; if (isset($segment->target) && $segment->target->attributes()) { - $metadata['target-attributes'] = array(); + $metadata['target-attributes'] = []; foreach ($segment->target->attributes() as $key => $value) { $metadata['target-attributes'][$key] = (string) $value; } } if (isset($unit->notes)) { - $metadata['notes'] = array(); + $metadata['notes'] = []; foreach ($unit->notes->note as $noteNode) { - $note = array(); + $note = []; foreach ($noteNode->attributes() as $key => $value) { $note[$key] = (string) $value; } @@ -173,7 +173,7 @@ class XliffFileLoader implements LoaderInterface private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, string $encoding = null): array { - $notes = array(); + $notes = []; if (null === $noteElement) { return $notes; @@ -182,7 +182,7 @@ class XliffFileLoader implements LoaderInterface /** @var \SimpleXMLElement $xmlNote */ foreach ($noteElement as $xmlNote) { $noteAttributes = $xmlNote->attributes(); - $note = array('content' => $this->utf8ToCharset((string) $xmlNote, $encoding)); + $note = ['content' => $this->utf8ToCharset((string) $xmlNote, $encoding)]; if (isset($noteAttributes['priority'])) { $note['priority'] = (int) $noteAttributes['priority']; } |
