PreferencesFormOOUI: Avoid Phan warning with weird signature of TabPanelLayout
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 4 Jul 2019 17:38:58 +0000 (19:38 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 4 Jul 2019 17:41:08 +0000 (19:41 +0200)
TabPanelLayout is documented to take two parameters, $name and $config.
The $name position parameter can also be passed as a named config option
in the $config array, but doing so confuses Phan, since there's no good
way to document it. Just don't do it.

Bug: T227144
Change-Id: Ifbd776844d722d58bf9f13cacc490407320731c6

includes/specials/forms/PreferencesFormOOUI.php

index 9b86812..5dae156 100644 (file)
@@ -146,9 +146,8 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                                ) .
                                $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' ],