Fix CodeSniffer and warnings in includes/db
[lhc/web/wiklou.git] / includes / api / ApiParamInfo.php
index 042396e..5092af0 100644 (file)
@@ -149,7 +149,7 @@ class ApiParamInfo extends ApiBase {
                                $item = array();
                                if ( is_numeric( $k ) ) {
                                        $retval['examples'] .= $v;
-                                       $result->setContent( $item, $v );
+                                       ApiResult::setContent( $item, $v );
                                } else {
                                        if ( !is_array( $v ) ) {
                                                $item['description'] = $v;
@@ -157,7 +157,7 @@ class ApiParamInfo extends ApiBase {
                                                $item['description'] = implode( $v, "\n" );
                                        }
                                        $retval['examples'] .= $item['description'] . ' ' . $k;
-                                       $result->setContent( $item, $k );
+                                       ApiResult::setContent( $item, $k );
                                }
                                $retval['allexamples'][] = $item;
                        }
@@ -226,7 +226,8 @@ class ApiParamInfo extends ApiBase {
                        if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
                                $a['type'] = $p[ApiBase::PARAM_TYPE];
                                if ( is_array( $a['type'] ) ) {
-                                       $a['type'] = array_values( $a['type'] ); // to prevent sparse arrays from being serialized to JSON as objects
+                                       // To prevent sparse arrays from being serialized to JSON as objects
+                                       $a['type'] = array_values( $a['type'] );
                                        $result->setIndexedTagName( $a['type'], 't' );
                                }
                        }
@@ -317,6 +318,7 @@ class ApiParamInfo extends ApiBase {
                sort( $querymodules );
                $formatmodules = $this->getMain()->getModuleManager()->getNames( 'format' );
                sort( $formatmodules );
+
                return array(
                        'modules' => array(
                                ApiBase::PARAM_ISMULTI => true,
@@ -340,13 +342,14 @@ class ApiParamInfo extends ApiBase {
                        'modules' => 'List of module names (value of the action= parameter)',
                        'querymodules' => 'List of query module names (value of prop=, meta= or list= parameter)',
                        'mainmodule' => 'Get information about the main (top-level) module as well',
-                       'pagesetmodule' => 'Get information about the pageset module (providing titles= and friends) as well',
+                       'pagesetmodule' => 'Get information about the pageset module ' .
+                               '(providing titles= and friends) as well',
                        'formatmodules' => 'List of format module names (value of format= parameter)',
                );
        }
 
        public function getDescription() {
-               return 'Obtain information about certain API parameters and errors';
+               return 'Obtain information about certain API parameters and errors.';
        }
 
        public function getExamples() {