PreferencesFormOOUI: Avoid Phan warning with weird signature of TabPanelLayout
[lhc/web/wiklou.git] / includes / specials / forms / PreferencesFormOOUI.php
index fd98dcb..5dae156 100644 (file)
@@ -139,15 +139,19 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                        $label = $this->getLegend( $key );
                        $content =
                                $this->getHeaderText( $key ) .
-                               $this->displaySection( $this->mFieldTree[$key] ) .
+                               $this->displaySection(
+                                       $this->mFieldTree[$key],
+                                       "",
+                                       "mw-prefsection-$key-"
+                               ) .
                                $this->getFooterText( $key );
 
-                       $tabPanels[] = new OOUI\TabPanelLayout( [
+                       $tabPanels[] = new OOUI\TabPanelLayout( 'mw-prefsection-' . $key, [
                                'classes' => [ 'mw-htmlform-autoinfuse-lazy' ],
-                               'name' => 'mw-prefsection-' . $key,
                                'label' => $label,
                                'content' => new OOUI\FieldsetLayout( [
                                        'classes' => [ 'mw-prefs-section-fieldset' ],
+                                       'id' => "mw-prefsection-$key",
                                        'label' => $label,
                                        'items' => [
                                                new OOUI\Widget( [
@@ -190,7 +194,7 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
 
        /**
         * Get the keys of each top level preference section.
-        * @return array of section keys
+        * @return string[] List of section keys
         */
        function getPreferenceSections() {
                return array_keys( array_filter( $this->mFieldTree, 'is_array' ) );