Merge "Vector: Update comments in vector.js"
[lhc/web/wiklou.git] / includes / api / ApiQuerySearch.php
index a2a15e0..d67fac2 100644 (file)
@@ -39,7 +39,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
         */
        const BACKEND_NULL_PARAM = 'database-backed';
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'sr' );
        }
 
@@ -52,7 +52,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
        }
 
        /**
-        * @param $resultPageSet ApiPageSet
+        * @param ApiPageSet $resultPageSet
         * @return void
         */
        private function run( $resultPageSet = null ) {
@@ -222,8 +222,12 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                                );
 
                                // Add item to results and see whether it fits
-                               $fit = $apiResult->addValue( array( 'query', 'interwiki' . $this->getModuleName(), $result->getInterwikiPrefix()  ),
-                                       null, $vals );
+                               $fit = $apiResult->addValue(
+                                       array( 'query', 'interwiki' . $this->getModuleName(), $result->getInterwikiPrefix()  ),
+                                       null,
+                                       $vals
+                               );
+
                                if ( !$fit ) {
                                        // We hit the limit. We can't really provide any meaningful
                                        // pagination info so just bail out