Call method with the same name it's defined with
[lhc/web/wiklou.git] / includes / api / ApiQuerySearch.php
index 36b5597..4fedebc 100644 (file)
@@ -112,12 +112,12 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                        $totalhits = $matches->getTotalHits();
                        if ( $totalhits !== null ) {
                                $apiResult->addValue( array( 'query', 'searchinfo' ),
-                                               'totalhits', $totalhits );
+                                       'totalhits', $totalhits );
                        }
                }
                if ( isset( $searchInfo['suggestion'] ) && $matches->hasSuggestion() ) {
                        $apiResult->addValue( array( 'query', 'searchinfo' ),
-                                               'suggestion', $matches->getSuggestionQuery() );
+                               'suggestion', $matches->getSuggestionQuery() );
                }
 
                // Add the search results to the result
@@ -127,8 +127,9 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                $result = $matches->next();
 
                while ( $result ) {
-                       if ( ++ $count > $limit ) {
-                               // We've reached the one extra which shows that there are additional items to be had. Stop here...
+                       if ( ++$count > $limit ) {
+                               // We've reached the one extra which shows that there are
+                               // additional items to be had. Stop here...
                                $this->setContinueEnumParameter( 'offset', $params['offset'] + $params['limit'] );
                                break;
                        }
@@ -184,7 +185,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
 
                                // Add item to results and see whether it fits
                                $fit = $apiResult->addValue( array( 'query', $this->getModuleName() ),
-                                               null, $vals );
+                                       null, $vals );
                                if ( !$fit ) {
                                        $this->setContinueEnumParameter( 'offset', $params['offset'] + $count - 1 );
                                        break;
@@ -198,8 +199,8 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
 
                if ( is_null( $resultPageSet ) ) {
                        $apiResult->setIndexedTagName_internal( array(
-                                               'query', $this->getModuleName()
-                                       ), 'p' );
+                               'query', $this->getModuleName()
+                       ), 'p' );
                } else {
                        $resultPageSet->populateFromTitles( $titles );
                }