Merge pull request #14417 from civicrm/5.14
[civicrm-core.git] / CRM / Utils / OptionBag.php
index 91c96a3a710f8aa7f15194d66e2b3862a8cca16f..dd133e535a9d5781af3376fc57f51bcef2dcfe1a 100644 (file)
@@ -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]));
     }
   }