X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLForm.php;h=b16801a2a85e6192b805c506e1f4d631192adc3a;hb=748c5eae2fd5d897c94c48771161c259941a7488;hp=ed151e6366c2f2d96c3f0b4f6b4faf48e94924b9;hpb=f2da0e29cfa02571d5649a01d9238b92e7ade662;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index ed151e6366..b16801a2a8 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -242,6 +242,10 @@ class HTMLForm extends ContextSource { protected $mUseMultipart = false; protected $mHiddenFields = []; + /** + * @var array[] + * @phan-var array + */ protected $mButtons = []; protected $mWrapperLegend = false; @@ -293,13 +297,10 @@ class HTMLForm extends ContextSource { * Construct a HTMLForm object for given display type. May return a HTMLForm subclass. * * @param string $displayFormat - * @param mixed $arguments,... Additional arguments to pass to the constructor. + * @param mixed ...$arguments Additional arguments to pass to the constructor. * @return HTMLForm */ - public static function factory( $displayFormat/*, $arguments...*/ ) { - $arguments = func_get_args(); - array_shift( $arguments ); - + public static function factory( $displayFormat, ...$arguments ) { switch ( $displayFormat ) { case 'vform': return new VFormHTMLForm( ...$arguments ); @@ -982,6 +983,9 @@ class HTMLForm extends ContextSource { * - attribs: (array, optional) Additional HTML attributes. * - flags: (string|string[], optional) OOUI flags. * - framed: (boolean=true, optional) OOUI framed attribute. + * @codingStandardsIgnoreStart + * @phan-param array{name:string,value:string,label-message?:string,label?:string,label-raw?:string,id?:string,attribs?:array,flags?:string|string[],framed?:bool} $data + * @codingStandardsIgnoreEnd * @return HTMLForm $this for chaining calls (since 1.20) */ public function addButton( $data ) { @@ -1321,7 +1325,7 @@ class HTMLForm extends ContextSource { } return $elementstr - ? Html::rawElement( 'div', [ 'class' => $elementsType ], $elementstr ) + ? Html::rawElement( 'div', [ 'class' => $elementsType . 'box' ], $elementstr ) : ''; }