switch ( $params['formatversion'] ) {
case 1:
- $transforms = array(
- 'BC' => array(),
- 'Types' => array(),
+ $transforms = [
+ 'BC' => [],
+ 'Types' => [],
'Strip' => 'all',
- );
+ ];
break;
case 2:
case 'latest':
- $transforms = array(
- 'Types' => array(),
+ $transforms = [
+ 'Types' => [],
'Strip' => 'all',
- );
+ ];
break;
default:
) {
$this->dieUsage(
'This response cannot be represented using format=php. ' .
- 'See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+ 'See https://phabricator.wikimedia.org/T68776',
'internalerror'
);
}
}
public function getAllowedParams() {
- $ret = array(
- 'formatversion' => array(
- ApiBase::PARAM_TYPE => array( 1, 2, 'latest' ),
+ $ret = parent::getAllowedParams() + [
+ 'formatversion' => [
+ ApiBase::PARAM_TYPE => [ 1, 2, 'latest' ],
ApiBase::PARAM_DFLT => 1,
ApiBase::PARAM_HELP_MSG => 'apihelp-php-param-formatversion',
- ),
- );
+ ],
+ ];
return $ret;
}
}