CRM_Extension_Info - Modern list expansion
authorTim Otten <totten@civicrm.org>
Fri, 28 Oct 2022 21:31:12 +0000 (14:31 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 28 Oct 2022 22:04:41 +0000 (15:04 -0700)
CRM/Extension/Info.php

index 8a1fc017933bf32f461928acdb05123be1bdbb07..8d5b4203ea11dfaee6a132af6b6f2ac63b79eee3 100644 (file)
@@ -104,7 +104,7 @@ class CRM_Extension_Info {
    * @return CRM_Extension_Info
    */
   public static function loadFromFile($file) {
-    list ($xml, $error) = CRM_Utils_XML::parseFile($file);
+    [$xml, $error] = CRM_Utils_XML::parseFile($file);
     if ($xml === FALSE) {
       throw new CRM_Extension_Exception_ParseException("Failed to parse info XML: $error");
     }
@@ -124,7 +124,7 @@ class CRM_Extension_Info {
    * @return CRM_Extension_Info
    */
   public static function loadFromString($string) {
-    list ($xml, $error) = CRM_Utils_XML::parseString($string);
+    [$xml, $error] = CRM_Utils_XML::parseString($string);
     if ($xml === FALSE) {
       throw new CRM_Extension_Exception_ParseException("Failed to parse info XML: $string");
     }