Merge "Introduce multiselect widgets for namespaces"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLMultiSelectField.php
index e9ecc40..1c4a785 100644 (file)
@@ -121,7 +121,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
 
        /**
         * Get options and make them into arrays suitable for OOUI.
-        * @return array Options for inclusion in a select or whatever.
+        * @throws MWException
         */
        public function getOptionsOOUI() {
                // Sections make this difficult. See getInputOOUI().
@@ -228,11 +228,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
        }
 
        public function getDefault() {
-               if ( isset( $this->mDefault ) ) {
-                       return $this->mDefault;
-               } else {
-                       return [];
-               }
+               return $this->mDefault ?? [];
        }
 
        public function filterDataForSubmit( $data ) {