From: Máté Szabó Date: Sat, 5 Oct 2019 16:27:30 +0000 (+0200) Subject: BaseTemplate: Use explicit varargs in method parameters X-Git-Tag: 1.34.0-rc.1~25 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=5ff92cd11ebcc3418e689a0ea3f170d4f1f78dc3;hp=13d176d840f85a58dd1411621c0af93a3877bfa7 BaseTemplate: Use explicit varargs in method parameters With the removal of HHVM support, we can now use explicit varargs in function arguments. This patch updates the BaseTemplateclass to do so, and also removes PhanCommentParamWithoutRealParam check suppressions, which are now redundant. Bug: T231710 Change-Id: If78bd1556c862a472afe3646fd362b3c6baefbe0 --- diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php index dedf83abc8..0e9bc57a07 100644 --- a/includes/skins/BaseTemplate.php +++ b/includes/skins/BaseTemplate.php @@ -32,12 +32,11 @@ abstract class BaseTemplate extends QuickTemplate { * Get a Message object with its context set * * @param string $name Message name - * @param mixed $params,... Message params - * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847 + * @param mixed ...$params Message params * @return Message */ - public function getMsg( $name /* ... */ ) { - return $this->getSkin()->msg( ...func_get_args() ); + public function getMsg( $name, ...$params ) { + return $this->getSkin()->msg( $name, ...$params ); } function msg( $str ) {