diff vendor/symfony/translation/Catalogue/AbstractOperation.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/AbstractOperation.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/symfony/translation/Catalogue/AbstractOperation.php	Thu Feb 28 13:11:55 2019 +0000
@@ -11,10 +11,10 @@
 
 namespace Symfony\Component\Translation\Catalogue;
 
+use Symfony\Component\Translation\Exception\InvalidArgumentException;
+use Symfony\Component\Translation\Exception\LogicException;
 use Symfony\Component\Translation\MessageCatalogue;
 use Symfony\Component\Translation\MessageCatalogueInterface;
-use Symfony\Component\Translation\Exception\InvalidArgumentException;
-use Symfony\Component\Translation\Exception\LogicException;
 
 /**
  * Base catalogues binary operation class.
@@ -31,7 +31,7 @@
     protected $result;
 
     /**
-     * @var null|array The domains affected by this operation
+     * @var array|null The domains affected by this operation
      */
     private $domains;
 
@@ -39,21 +39,20 @@
      * This array stores 'all', 'new' and 'obsolete' messages for all valid domains.
      *
      * The data structure of this array is as follows:
-     * ```php
-     * array(
-     *     'domain 1' => array(
-     *         'all' => array(...),
-     *         'new' => array(...),
-     *         'obsolete' => array(...)
-     *     ),
-     *     'domain 2' => array(
-     *         'all' => array(...),
-     *         'new' => array(...),
-     *         'obsolete' => array(...)
-     *     ),
-     *     ...
-     * )
-     * ```
+     *
+     *     [
+     *         'domain 1' => [
+     *             'all' => [...],
+     *             'new' => [...],
+     *             'obsolete' => [...]
+     *         ],
+     *         'domain 2' => [
+     *             'all' => [...],
+     *             'new' => [...],
+     *             'obsolete' => [...]
+     *         ],
+     *         ...
+     *     ]
      *
      * @var array The array that stores 'all', 'new' and 'obsolete' messages
      */
@@ -71,7 +70,7 @@
         $this->source = $source;
         $this->target = $target;
         $this->result = new MessageCatalogue($source->getLocale());
-        $this->messages = array();
+        $this->messages = [];
     }
 
     /**
@@ -91,7 +90,7 @@
      */
     public function getMessages($domain)
     {
-        if (!in_array($domain, $this->getDomains())) {
+        if (!\in_array($domain, $this->getDomains())) {
             throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
         }
 
@@ -107,7 +106,7 @@
      */
     public function getNewMessages($domain)
     {
-        if (!in_array($domain, $this->getDomains())) {
+        if (!\in_array($domain, $this->getDomains())) {
             throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
         }
 
@@ -123,7 +122,7 @@
      */
     public function getObsoleteMessages($domain)
     {
-        if (!in_array($domain, $this->getDomains())) {
+        if (!\in_array($domain, $this->getDomains())) {
             throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
         }