BaseTemplate: Use explicit varargs in method parameters
authorMáté Szabó <mszabo@wikia-inc.com>
Sat, 5 Oct 2019 16:27:30 +0000 (18:27 +0200)
committerReedy <reedy@wikimedia.org>
Fri, 18 Oct 2019 20:35:48 +0000 (21:35 +0100)
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

includes/skins/BaseTemplate.php

index dedf83a..0e9bc57 100644 (file)
@@ -32,12 +32,11 @@ abstract class BaseTemplate extends QuickTemplate {
         * Get a Message object with its context set
         *
         * @param string $name Message name
         * 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
         */
         * @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 ) {
        }
 
        function msg( $str ) {