In OOUI-php the class TabPanelLayout is defined to take a string as first argument:
/** * @param string $name Unique symbolic name of tab panel * @param array $config Configuration options * - string|HtmlSnippet $config['label'] Label for tab panel's tab * @param-taint $config escapes_htmlnoent */ public function __construct( $name, array $config = [] ) { // Allow passing positional parameters inside the config array if ( is_array( $name ) && isset( $name['name'] ) ) { $config = $name; $name = $config['name']; }
But the class also accept arrays for the first argument.
Please adjust the documentation to make phan happy in mediawiki/core
<file name="includes\specials\forms\PreferencesFormOOUI.php"> <error line="150" severity="warning" message="Argument 1 (name) is array{classes:array{0:'mw-htmlform-autoinfuse-lazy'},name:string,label:string,content:\OOUI\Element|\OOUI\FieldsetLayout|\OOUI\GroupElement|\OOUI\IconElement|\OOUI\LabelElement|\OOUI\Layout|\OOUI\Tag|string,expanded:false,framed:true} but \OOUI\TabPanelLayout::__construct() takes string defined at vendor\oojs\oojs-ui\php\layouts\TabPanelLayout.php:34" source="PhanTypeMismatchArgument"/> </file>
It seems this is also wrong on other classes like ActionFieldLayout or FieldLayout
Thanks.