From fe7a8d9adff4682e9c89396504010c15c94909b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1t=C3=A9=20Szab=C3=B3?= Date: Sat, 5 Oct 2019 17:52:29 +0200 Subject: [PATCH] PPFrame: 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 PPFrame interface to do so, and also removes PhanCommentParamWithoutRealParam check suppressions, which are now redundant. It seems that classes implementing this interface were already using varargs. Bug: T231710 Change-Id: Ib1d69575835df80dca4e43b0028ad9368f62bb58 --- includes/parser/PPFrame.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/includes/parser/PPFrame.php b/includes/parser/PPFrame.php index b50fcfce05..51fc0b6689 100644 --- a/includes/parser/PPFrame.php +++ b/includes/parser/PPFrame.php @@ -71,41 +71,37 @@ interface PPFrame { * Implode with flags for expand() * @param string $sep * @param int $flags - * @param string|PPNode $args,... - * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847 + * @param string|PPNode ...$params * @return string */ - public function implodeWithFlags( $sep, $flags /*, ... */ ); + public function implodeWithFlags( $sep, $flags, ...$params ); /** * Implode with no flags specified * @param string $sep - * @param string|PPNode $args,... - * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847 + * @param string|PPNode ...$params * @return string */ - public function implode( $sep /*, ... */ ); + public function implode( $sep, ...$params ); /** * Makes an object that, when expand()ed, will be the same as one obtained * with implode() * @param string $sep - * @param string|PPNode ...$args - * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847 + * @param string|PPNode ...$params * @return PPNode */ - public function virtualImplode( $sep /* ...$args */ ); + public function virtualImplode( $sep, ...$params ); /** * Virtual implode with brackets * @param string $start * @param string $sep * @param string $end - * @param string|PPNode ...$args - * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847 + * @param string|PPNode ...$params * @return PPNode */ - public function virtualBracketedImplode( $start, $sep, $end /* ...$args */ ); + public function virtualBracketedImplode( $start, $sep, $end, ...$params ); /** * Returns true if there are no arguments in this frame -- 2.20.1