jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358428 )

Change subject: Fix indent and trailing spaces of some lines
......................................................................


Fix indent and trailing spaces of some lines

Changes spaces to tabs or remove tabs or spaces

Change-Id: If14f2b747495e1a61656eebd0fc6d9763d75ab15
---
M includes/Api/SettingsDump.php
M includes/BuildDocument/Builder.php
M includes/CirrusSearch.php
M includes/CompletionSuggester.php
M includes/Elastica/MatchNone.php
M includes/Extra/Query/SourceRegex.php
M includes/Query/RegexInSourceFeature.php
M maintenance/forceSearchIndex.php
M maintenance/freezeWritesToCluster.php
M tests/relforge/RelForgeSettings.php
M tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
M tests/relforge/en-wp-bm25-wp10/misc.inc
M tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php
M tests/unit/SuggestBuilderTest.php
14 files changed, 59 insertions(+), 53 deletions(-)

Approvals:
  Tjones: Looks good to me, approved
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Api/SettingsDump.php b/includes/Api/SettingsDump.php
index 3c1c20d..c034904 100644
--- a/includes/Api/SettingsDump.php
+++ b/includes/Api/SettingsDump.php
@@ -27,7 +27,7 @@
                $conn = $this->getCirrusConnection();
                $indexPrefix = $this->getSearchConfig()->get( 
SearchConfig::INDEX_BASE_NAME );
                foreach( $conn->getAllIndexTypes() as $index ) {
-                       $this->getResult()->addValue( 
+                       $this->getResult()->addValue(
                                [ $index, 'page' ],
                                'index',
                                $conn->getIndex( $indexPrefix, $index 
)->getSettings()->get()
diff --git a/includes/BuildDocument/Builder.php 
b/includes/BuildDocument/Builder.php
index 5c59b53..16a9357 100644
--- a/includes/BuildDocument/Builder.php
+++ b/includes/BuildDocument/Builder.php
@@ -79,7 +79,7 @@
         * @param Title|null $title The title to build a document for
         * @param Content $content The page content to build a document from
         * @param ParserOutput $parserOutput The parser output to build a 
document from
-        */ 
+        */
        public function __construct( \Elastica\Document $doc, Title $title = 
null, Content $content, ParserOutput $parserOutput ) {
                parent::__construct( $doc, $title );
                $this->content = $content;
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index dbf50b3..2416298 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -81,10 +81,10 @@
         */
        private $request;
 
-    /**
-     * CirrusSearchIndexFieldFactory
-     */
-    private $searchIndexFieldFactory;
+       /**
+        * CirrusSearchIndexFieldFactory
+        */
+       private $searchIndexFieldFactory;
 
        /**
         * Sets the behaviour for the dump query, dump result, etc debugging 
features.
@@ -100,14 +100,14 @@
                // This is useful to do tests accross multiple clusters
                UserTesting::getInstance();
                $this->config = MediaWikiServices::getInstance()
-                               ->getConfigFactory()
-                               ->makeConfig( 'CirrusSearch' );
+                       ->getConfigFactory()
+                       ->makeConfig( 'CirrusSearch' );
                $this->indexBaseName = $baseName === null
                        ? $this->config->get( SearchConfig::INDEX_BASE_NAME )
                        : $baseName;
                $this->connection = new Connection( $this->config );
                $this->request = RequestContext::getMain()->getRequest();
-        $this->searchIndexFieldFactory = new CirrusSearchIndexFieldFactory( 
$this->config );
+               $this->searchIndexFieldFactory = new 
CirrusSearchIndexFieldFactory( $this->config );
 
                // enable interwiki by default
                $this->features['interwiki'] = true;
@@ -170,7 +170,8 @@
                }
 
                if ( $this->isFeatureEnabled( 'rewrite' ) &&
-                               $matches->isQueryRewriteAllowed( 
$GLOBALS['wgCirrusSearchInterwikiThreshold'] ) ) {
+                       $matches->isQueryRewriteAllowed( 
$GLOBALS['wgCirrusSearchInterwikiThreshold'] )
+               ) {
                        $status = $this->searchTextSecondTry( $term, $status );
                }
                ElasticsearchIntermediary::setResultPages( [ 
$status->getValue() ] );
diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 84523d9..4d4e07d 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -323,7 +323,7 @@
         * @param int $queryLen the original query length
         * @return array new variant profiles
         */
-        protected function handleVariants( array $profiles, $queryLen ) {
+       protected function handleVariants( array $profiles, $queryLen ) {
                $variantIndex = 0;
                $allVariantProfiles = [];
                $allSuggestions = [];
diff --git a/includes/Elastica/MatchNone.php b/includes/Elastica/MatchNone.php
index f0c7b6b..10492bb 100644
--- a/includes/Elastica/MatchNone.php
+++ b/includes/Elastica/MatchNone.php
@@ -8,11 +8,11 @@
  * @link 
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html
  */
 class MatchNone extends \Elastica\Query\AbstractQuery {
-    /**
-     * Creates match none query.
-     */
-    public function __construct() {
-        /** @suppress PhanTypeMismatchProperty (done like that in Elastica) */
-        $this->_params = new \stdClass();
-    }
+       /**
+        * Creates match none query.
+        */
+       public function __construct() {
+               /** @suppress PhanTypeMismatchProperty (done like that in 
Elastica) */
+               $this->_params = new \stdClass();
+       }
 }
diff --git a/includes/Extra/Query/SourceRegex.php 
b/includes/Extra/Query/SourceRegex.php
index 5f73dc9..84ca1a9 100644
--- a/includes/Extra/Query/SourceRegex.php
+++ b/includes/Extra/Query/SourceRegex.php
@@ -69,15 +69,15 @@
                return $this->setParam( 'ngram_field', $ngramField );
        }
 
-    /**
-     * @param int $gramSize size of the ngrams extracted for accelerating
-     *  the regex.  Defaults to 3 if not set.  That gram size must have been
-     *  produced by analyzing the ngramField.
-     * @return self
-     */
-    public function setGramSize( $gramSize ) {
-        return $this->setParam( 'gram_size', $gramSize );
-    }
+       /**
+        * @param int $gramSize size of the ngrams extracted for accelerating
+        *  the regex.  Defaults to 3 if not set.  That gram size must have been
+        *  produced by analyzing the ngramField.
+        * @return self
+        */
+       public function setGramSize( $gramSize ) {
+               return $this->setParam( 'gram_size', $gramSize );
+       }
 
        /**
         * @param int $maxExpand maximum range before outgoing automaton arcs 
are
@@ -131,14 +131,14 @@
                return $this->setParam( 'case_sensitive', $caseSensitive );
        }
 
-    /**
-     * @param string $locale locale used for case conversions.  Its important 
that
-     *  this matches the locale used for lowercasing in the ngram index.
-     * @return self
-     */
-    public function setLocale( $locale ) {
-        return $this->setParam( 'locale', $locale );
-    }
+       /**
+        * @param string $locale locale used for case conversions.  Its 
important that
+        *  this matches the locale used for lowercasing in the ngram index.
+        * @return self
+        */
+       public function setLocale( $locale ) {
+               return $this->setParam( 'locale', $locale );
+       }
 
        /**
         * @param int $maxNgrams The maximum number of ngrams to extracted from 
the
diff --git a/includes/Query/RegexInSourceFeature.php 
b/includes/Query/RegexInSourceFeature.php
index bad78c1..15efbbb 100644
--- a/includes/Query/RegexInSourceFeature.php
+++ b/includes/Query/RegexInSourceFeature.php
@@ -61,7 +61,7 @@
                return QueryHelper::extractSpecialSyntaxFromTerm(
                        $context,
                        $term,
-            
'/(?<not>-)?insource:\/(?<pattern>(?:[^\\\\\/]|\\\\.)+)\/(?<insensitive>i)? ?/',
+                       
'/(?<not>-)?insource:\/(?<pattern>(?:[^\\\\\/]|\\\\.)+)\/(?<insensitive>i)? ?/',
                        function ( $matches ) use ( $context ) {
                                if ( !$this->enabled ) {
                                        $context->addWarning(
diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php
index 5712af1..99b52f8 100644
--- a/maintenance/forceSearchIndex.php
+++ b/maintenance/forceSearchIndex.php
@@ -221,14 +221,16 @@
                        $this->error( '--ids cannot be used with 
deletes/archive/from/to/fromId/toId/limit', 1 );
                }
 
-               $pageIds = array_map( function( $pageId ) {
+               $pageIds = array_map(
+                       function( $pageId ) {
                                $pageId = trim( $pageId );
                                if ( !ctype_digit( $pageId ) ) {
                                        $this->error( "Invalid page id provided 
in --ids, got '$pageId', expected a positive integer", 1 );
                                }
                                return intval( $pageId );
                        },
-                       explode( ',', $this->getOption( 'ids' ) ) );
+                       explode( ',', $this->getOption( 'ids' ) )
+               );
                return array_unique( $pageIds, SORT_REGULAR );
        }
 
diff --git a/maintenance/freezeWritesToCluster.php 
b/maintenance/freezeWritesToCluster.php
index 8f43e50..1eac5e0 100644
--- a/maintenance/freezeWritesToCluster.php
+++ b/maintenance/freezeWritesToCluster.php
@@ -26,7 +26,7 @@
 
 $IP = getenv( 'MW_INSTALL_PATH' );
 if( $IP === false ) {
-        $IP = __DIR__ . '/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 require_once( "$IP/maintenance/Maintenance.php" );
 require_once( __DIR__ . '/../includes/Maintenance/Maintenance.php' );
diff --git a/tests/relforge/RelForgeSettings.php 
b/tests/relforge/RelForgeSettings.php
index a384a50..c684971 100644
--- a/tests/relforge/RelForgeSettings.php
+++ b/tests/relforge/RelForgeSettings.php
@@ -10,9 +10,9 @@
 
 // pop score is global
 $wgHooks['CirrusSearchMappingConfig'][] = function( array &$config, 
$mappingConfigBuilder ) {
-        $config['page']['properties']['popularity_score'] = [
-                'type' => 'double',
-        ];
+       $config['page']['properties']['popularity_score'] = [
+               'type' => 'double',
+       ];
 };
 
 // No need for replicas in relforge
@@ -42,7 +42,7 @@
 
 // Activate devel options useful for relforge
 $wgCirrusSearchDevelOptions = [
-        'morelike_collect_titles_from_elastic' => true,
+       'morelike_collect_titles_from_elastic' => true,
        'ignore_missing_rev' => true,
 ];
 
diff --git a/tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc 
b/tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
index d8d4bbb..5db3afa 100644
--- a/tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
+++ b/tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
@@ -15,7 +15,7 @@
 ];
 
 $wgHooks['CirrusSearchMappingConfig'][] = function( array &$config, 
$mappingConfigBuilder ) {
-        $config['page']['properties']['wp10'] = [
-                'type' => 'double',
-        ];
+       $config['page']['properties']['wp10'] = [
+               'type' => 'double',
+       ];
 };
diff --git a/tests/relforge/en-wp-bm25-wp10/misc.inc 
b/tests/relforge/en-wp-bm25-wp10/misc.inc
index 9e19b1a..1f4aeaf 100644
--- a/tests/relforge/en-wp-bm25-wp10/misc.inc
+++ b/tests/relforge/en-wp-bm25-wp10/misc.inc
@@ -15,7 +15,7 @@
 ];
 
 $wgHooks['CirrusSearchMappingConfig'][] = function( array &$config, 
$mappingConfigBuilder ) {
-        $config['page']['properties']['wp10'] = [
-                'type' => 'double',
-        ];
+       $config['page']['properties']['wp10'] = [
+               'type' => 'double',
+       ];
 };
diff --git a/tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php 
b/tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php
index 4432cf9..9dbadc9 100644
--- a/tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php
+++ b/tests/unit/Search/CirrusSearchIndexFieldFactoryTest.php
@@ -44,12 +44,12 @@
 
        private function getSearchConfig() {
                return $this->getMockBuilder( 'CirrusSearch\SearchConfig' )
-            ->getMock();
+                       ->getMock();
        }
 
        private function getSearchEngine() {
                return $this->getMockBuilder( 'CirrusSearch' )
-            ->getMock();
+                       ->getMock();
        }
 
 }
diff --git a/tests/unit/SuggestBuilderTest.php 
b/tests/unit/SuggestBuilderTest.php
index 0cfdcbd..c16fa08 100644
--- a/tests/unit/SuggestBuilderTest.php
+++ b/tests/unit/SuggestBuilderTest.php
@@ -350,11 +350,14 @@
        private function buildSuggestions( $builder, $doc ) {
                $id = $doc['id'];
                unset( $doc['id'] );
-               return array_map( function( $x ) {
+               return array_map(
+                       function( $x ) {
                                $dat = $x->getData();
                                unset( $dat['batch_id'] );
                                return $dat;
-                       }, $builder->build( [ [ 'id' => $id, 'source' => $doc ] 
] ) );
+                       },
+                       $builder->build( [ [ 'id' => $id, 'source' => $doc ] ] )
+               );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/358428
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If14f2b747495e1a61656eebd0fc6d9763d75ab15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Cindy-the-browser-test-bot <bernhardsone...@gmail.com>
Gerrit-Reviewer: DCausse <dcau...@wikimedia.org>
Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: Gehel <guillaume.leder...@wikimedia.org>
Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org>
Gerrit-Reviewer: Tjones <tjo...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to