diff vendor/symfony/translation/Catalogue/TargetOperation.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/symfony/translation/Catalogue/TargetOperation.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/symfony/translation/Catalogue/TargetOperation.php	Thu Feb 28 13:11:55 2019 +0000
@@ -28,25 +28,25 @@
      */
     protected function processDomain($domain)
     {
-        $this->messages[$domain] = array(
-            'all' => array(),
-            'new' => array(),
-            'obsolete' => array(),
-        );
+        $this->messages[$domain] = [
+            'all' => [],
+            'new' => [],
+            'obsolete' => [],
+        ];
 
         // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``,
         // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback}
         //
-        // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));``
+        // For 'new' messages, the code can't be simplified as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));``
         // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback}
         //
-        // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))``
+        // For 'obsolete' messages, the code can't be simplified as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))``
         // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback}
 
         foreach ($this->source->all($domain) as $id => $message) {
             if ($this->target->has($id, $domain)) {
                 $this->messages[$domain]['all'][$id] = $message;
-                $this->result->add(array($id => $message), $domain);
+                $this->result->add([$id => $message], $domain);
                 if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) {
                     $this->result->setMetadata($id, $keyMetadata, $domain);
                 }
@@ -59,7 +59,7 @@
             if (!$this->source->has($id, $domain)) {
                 $this->messages[$domain]['all'][$id] = $message;
                 $this->messages[$domain]['new'][$id] = $message;
-                $this->result->add(array($id => $message), $domain);
+                $this->result->add([$id => $message], $domain);
                 if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) {
                     $this->result->setMetadata($id, $keyMetadata, $domain);
                 }