From: Michael Große Date: Mon, 11 Mar 2019 18:10:54 +0000 (+0100) Subject: Use splat operator in signature, not func_get_args X-Git-Tag: 1.34.0-rc.1~26 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=13d176d840f85a58dd1411621c0af93a3877bfa7 Use splat operator in signature, not func_get_args Most of the original scope of this patch was implemented in 8665536045c What remains is to use the splat operator in the method signature as well which is more readable than using func_get_args and doesn't annoy phan. This is now possible, because we are no longer testing on HHVM and these mocking in HHVM tests was the only place where this was broken. Change-Id: I52912d1810b955b05cd17fab424f80c201883411 --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 58c16021fc..b16801a2a8 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -297,14 +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. - * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847 + * @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 );