Merge pull request #14417 from civicrm/5.14
[civicrm-core.git] / CRM / Utils / OptionBag.php
index 125dd3654a470a83b471d4e6d5827174b4f71252..dd133e535a9d5781af3376fc57f51bcef2dcfe1a 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 
 /**
@@ -40,7 +40,7 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable {
   /**
    * @param array $data
    */
-  public function __construct($data = array()) {
+  public function __construct($data = []) {
     $this->data = $data;
   }
 
@@ -72,7 +72,7 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable {
       return $r;
     }
     else {
-      throw new \API_Exception(ts("Could not find valid value for %1 (%2)", array(1 => $key, 2 => $type)));
+      throw new \API_Exception(ts("Could not find valid value for %1 (%2)", [1 => $key, 2 => $type]));
     }
   }