X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiAuthManagerHelper.php;h=9a3f75eb4d9d95de3f27821b8b99275976f5890c;hp=e37b4d481da6f2532fa59ebfa49749015e0de7ed;hb=9283760f340c6971d748fb574a35453fa7928807;hpb=067b22566476639d404d1caaf9a460a4a0a398fe diff --git a/includes/api/ApiAuthManagerHelper.php b/includes/api/ApiAuthManagerHelper.php index e37b4d481d..9a3f75eb4d 100644 --- a/includes/api/ApiAuthManagerHelper.php +++ b/includes/api/ApiAuthManagerHelper.php @@ -306,9 +306,10 @@ class ApiAuthManagerHelper { /** * Clean up a field array for output - * @param ApiBase $module For context and parameters 'mergerequestfields' - * and 'messageformat' * @param array $fields + * @codingStandardsIgnoreStart + * @phan-param array{type:string,options:array,value:string,label:Message,help:Message,optional:bool,sensitive:bool,skippable:bool} $fields + * @codingStandardsIgnoreEnd * @return array */ private function formatFields( array $fields ) { @@ -345,10 +346,10 @@ class ApiAuthManagerHelper { /** * Fetch the standard parameters this helper recognizes * @param string $action AuthManager action - * @param string $param,... Parameters to use + * @param string ...$wantedParams Parameters to use * @return array */ - public static function getStandardParams( $action, $param /* ... */ ) { + public static function getStandardParams( $action, ...$wantedParams ) { $params = [ 'requests' => [ ApiBase::PARAM_TYPE => 'string', @@ -384,8 +385,6 @@ class ApiAuthManagerHelper { ]; $ret = []; - $wantedParams = func_get_args(); - array_shift( $wantedParams ); foreach ( $wantedParams as $name ) { if ( isset( $params[$name] ) ) { $ret[$name] = $params[$name];