Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / api / ApiFormatPhp.php
index 6420a5b..d111af5 100644 (file)
@@ -39,19 +39,19 @@ class ApiFormatPhp extends ApiFormatBase {
 
                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:
@@ -69,7 +69,7 @@ class ApiFormatPhp extends ApiFormatBase {
                ) {
                        $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'
                        );
                }
@@ -78,13 +78,13 @@ class ApiFormatPhp extends ApiFormatBase {
        }
 
        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;
        }
 }