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

Change subject: Improve some parameter docs
......................................................................


Improve some parameter docs

Change-Id: I1a7f25f6d4bdeb5994798a8c939cc94bfbe723a7
---
M includes/Api/ConfigDump.php
M includes/Api/MappingDump.php
M includes/Api/SettingsDump.php
M includes/BuildDocument/Completion/DefaultSortSuggestionsBuilder.php
M includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
M includes/BuildDocument/Completion/SuggestBuilder.php
M includes/BuildDocument/Completion/SuggestScoring.php
M includes/CirrusConfigInterwikiResolver.php
M includes/Extra/Query/SourceRegex.php
M includes/Extra/Query/TokenCountRouter.php
M includes/Hooks.php
M includes/Job/CheckerJob.php
M includes/Job/ElasticaWrite.php
M includes/Job/Job.php
M includes/Maintenance/MetaStoreIndex.php
M includes/Query/FullTextQueryStringQueryBuilder.php
M includes/Query/FullTextSimpleMatchQueryBuilder.php
M includes/Search/CrossProjectBlockScorer.php
M includes/Search/SearchContext.php
M includes/Search/TextIndexField.php
M includes/SearchRequestLog.php
M includes/SiteMatrixInterwikiResolver.php
M phpcs.xml
M tests/jenkins/Jenkins.php
24 files changed, 43 insertions(+), 41 deletions(-)

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



diff --git a/includes/Api/ConfigDump.php b/includes/Api/ConfigDump.php
index a35af08..06d6fbd 100644
--- a/includes/Api/ConfigDump.php
+++ b/includes/Api/ConfigDump.php
@@ -148,6 +148,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/includes/Api/MappingDump.php b/includes/Api/MappingDump.php
index 9c1d8d2..fc180d4 100644
--- a/includes/Api/MappingDump.php
+++ b/includes/Api/MappingDump.php
@@ -48,6 +48,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/includes/Api/SettingsDump.php b/includes/Api/SettingsDump.php
index 310a3a4..c18baa6 100644
--- a/includes/Api/SettingsDump.php
+++ b/includes/Api/SettingsDump.php
@@ -48,6 +48,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git 
a/includes/BuildDocument/Completion/DefaultSortSuggestionsBuilder.php 
b/includes/BuildDocument/Completion/DefaultSortSuggestionsBuilder.php
index f2b6935..a859d1f 100644
--- a/includes/BuildDocument/Completion/DefaultSortSuggestionsBuilder.php
+++ b/includes/BuildDocument/Completion/DefaultSortSuggestionsBuilder.php
@@ -10,7 +10,7 @@
        const FIELD = 'defaultsort';
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getRequiredFields() {
                return [ self::FIELD ];
diff --git 
a/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php 
b/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
index 21c4cb6..713eb99 100644
--- a/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
+++ b/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
@@ -79,7 +79,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getRequiredFields() {
                // This builder needs the language field
diff --git a/includes/BuildDocument/Completion/SuggestBuilder.php 
b/includes/BuildDocument/Completion/SuggestBuilder.php
index e7b93bd..fd4cbf2 100644
--- a/includes/BuildDocument/Completion/SuggestBuilder.php
+++ b/includes/BuildDocument/Completion/SuggestBuilder.php
@@ -437,8 +437,8 @@
 
        /**
         * Encode the suggestion doc id
-        * @param string $docId
         * @param string $suggestionType
+        * @param string $docId
         * @return string
         */
        public static function encodeDocId( $suggestionType, $docId ) {
diff --git a/includes/BuildDocument/Completion/SuggestScoring.php 
b/includes/BuildDocument/Completion/SuggestScoring.php
index 2105454..80ae5e0 100644
--- a/includes/BuildDocument/Completion/SuggestScoring.php
+++ b/includes/BuildDocument/Completion/SuggestScoring.php
@@ -71,14 +71,14 @@
  */
 class IncomingLinksScoringMethod implements SuggestScoringMethod {
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function score( array $doc ) {
                return isset( $doc['incoming_links'] ) ? $doc['incoming_links'] 
: 0;
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getRequiredFields() {
                return [ 'incoming_links' ];
@@ -151,7 +151,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function score( array $doc ) {
                return intval( $this->intermediateScore( $doc ) * 
self::SCORE_RANGE );
@@ -257,7 +257,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getRequiredFields() {
                return [ 'incoming_links', 'external_link', 'text_bytes', 
'heading', 'redirect', 'template' ];
diff --git a/includes/CirrusConfigInterwikiResolver.php 
b/includes/CirrusConfigInterwikiResolver.php
index dc1cafb..b8b07f5 100644
--- a/includes/CirrusConfigInterwikiResolver.php
+++ b/includes/CirrusConfigInterwikiResolver.php
@@ -11,7 +11,7 @@
 
 class CirrusConfigInterwikiResolver extends BaseInterwikiResolver {
        /**
-        * @param $config SearchConfig
+        * @param SearchConfig $config
         * @return bool true if this resolver can run with the specified config
         */
        public static function accepts( SearchConfig $config ) {
diff --git a/includes/Extra/Query/SourceRegex.php 
b/includes/Extra/Query/SourceRegex.php
index 9183bb4..36f3377 100644
--- a/includes/Extra/Query/SourceRegex.php
+++ b/includes/Extra/Query/SourceRegex.php
@@ -150,10 +150,10 @@
        }
 
        /**
-       * @param int $maxNgramClauses The maximum number of boolean clauses
-       *  generated from extracted ngrams.
-       * @return self
-       */
+        * @param int $maxNgramClauses The maximum number of boolean clauses
+        *  generated from extracted ngrams.
+        * @return self
+        */
        public function setMaxNgramClauses( $maxNgramClauses ) {
                return $this->setParam( 'max_ngram_clauses', $maxNgramClauses );
        }
diff --git a/includes/Extra/Query/TokenCountRouter.php 
b/includes/Extra/Query/TokenCountRouter.php
index 35c48ff..e8872d9 100644
--- a/includes/Extra/Query/TokenCountRouter.php
+++ b/includes/Extra/Query/TokenCountRouter.php
@@ -116,6 +116,7 @@
         * @param int $value the value to compare
         * @param AbstractQuery $query the query to run if the condition is
         * true ignoring all remaining conditions
+        * @return self
         */
        public function addCondition( $type, $value, AbstractQuery $query ) {
                switch ( $type ) {
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 6c1ac84..2376275 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -405,7 +405,7 @@
 
        /**
         * Hook called to include Elasticsearch version info on Special:Version
-        * @param array $software Array of wikitext and version numbers
+        * @param array &$software Array of wikitext and version numbers
         * @return bool
         */
        public static function onSoftwareInfo( &$software ) {
@@ -491,7 +491,7 @@
 
        /**
         * Register Cirrus's unit tests.
-        * @param array $files containing tests
+        * @param array &$files containing tests
         * @return bool
         */
        public static function onUnitTestsList( &$files ) {
@@ -516,8 +516,8 @@
 
        /**
         * Extract namespaces from query string.
-        * @param array $namespaces
-        * @param string $search
+        * @param array &$namespaces
+        * @param string &$search
         * @return bool
         */
        public static function prefixSearchExtractNamespace( &$namespaces, 
&$search ) {
@@ -530,7 +530,7 @@
        /**
         * Let Elasticsearch take a crack at getting near matches once 
mediawiki has tried all kinds of variants.
         * @param string $term the original search term and all language 
variants
-        * @param null|Title $titleResult resulting match.  A Title if we found 
something, unchanged otherwise.
+        * @param null|Title &$titleResult resulting match.  A Title if we 
found something, unchanged otherwise.
         * @return bool return false if we find something, true otherwise so 
mediawiki can try its default behavior
         * @throws ApiUsageException
         * @throws UsageException
@@ -670,7 +670,7 @@
         * and for variables this should work cross skin
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
         *
-        * @param array $vars
+        * @param array &$vars
         * @return bool
         */
        public static function onResourceLoaderGetConfigVars( &$vars ) {
@@ -704,11 +704,11 @@
        /**
         * Add $wgCirrusSearchInterwikiProv to external results.
         * @param Title $title
-        * @param mixed $text
+        * @param mixed &$text
         * @param mixed $result
         * @param mixed $terms
         * @param mixed $page
-        * @param array $query
+        * @param array &$query
         */
        public static function onShowSearchHitTitle( Title $title, &$text, 
$result, $terms, $page, &$query = [] ) {
                global $wgCirrusSearchInterwikiProv;
diff --git a/includes/Job/CheckerJob.php b/includes/Job/CheckerJob.php
index 1fe9a9e..1b13bc5 100644
--- a/includes/Job/CheckerJob.php
+++ b/includes/Job/CheckerJob.php
@@ -216,6 +216,7 @@
 
        /**
         * This job handles all its own retries internally.
+        * @return bool
         */
        public function allowRetries() {
                return false;
diff --git a/includes/Job/ElasticaWrite.php b/includes/Job/ElasticaWrite.php
index 247383e..3221e5c 100644
--- a/includes/Job/ElasticaWrite.php
+++ b/includes/Job/ElasticaWrite.php
@@ -55,6 +55,7 @@
         * that some point in time around the failure needs to be reindexed
         * manually. See https://wikitech.wikimedia.org/wiki/Search for more
         * details.
+        * @return bool
         */
        public function allowRetries() {
                return false;
diff --git a/includes/Job/Job.php b/includes/Job/Job.php
index 2b1fff2..8561089 100644
--- a/includes/Job/Job.php
+++ b/includes/Job/Job.php
@@ -152,7 +152,7 @@
        abstract protected function doJob();
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function allowRetries() {
                return $this->allowRetries;
diff --git a/includes/Maintenance/MetaStoreIndex.php 
b/includes/Maintenance/MetaStoreIndex.php
index 69593eb..da7ee1c 100644
--- a/includes/Maintenance/MetaStoreIndex.php
+++ b/includes/Maintenance/MetaStoreIndex.php
@@ -462,7 +462,7 @@
 
        /**
         * Update versions for all types on the index.
-        * @param $baseName
+        * @param string $baseName
         */
        public function updateAllVersions( $baseName ) {
                self::updateAllMetastoreVersions( $this->connection, $baseName 
);
@@ -545,8 +545,8 @@
        /**
         * Create version data for index type.
         * @param Connection $connection
-        * @param $indexBaseName
-        * @param $indexTypeName
+        * @param string $indexBaseName
+        * @param string $indexTypeName
         * @return \Elastica\Document
         */
        public static function versionData( Connection $connection, 
$indexBaseName,
@@ -580,8 +580,8 @@
        /**
         * Update version metastore for certain index.
         * @param Connection $connection
-        * @param $indexBaseName
-        * @param $indexTypeName
+        * @param string $indexBaseName
+        * @param string $indexTypeName
         * @throws \Exception
         */
        public static function updateMetastoreVersions( Connection $connection, 
$indexBaseName,
diff --git a/includes/Query/FullTextQueryStringQueryBuilder.php 
b/includes/Query/FullTextQueryStringQueryBuilder.php
index 8152a31..bc54967 100644
--- a/includes/Query/FullTextQueryStringQueryBuilder.php
+++ b/includes/Query/FullTextQueryStringQueryBuilder.php
@@ -634,7 +634,7 @@
 
        /**
         * Determines if a phrase rescore is needed
-        * @param SearchContext $searchContext
+        * @param SearchContext $searchContext
         * @return bool true if we can a phrase rescore
         */
        protected function isPhraseRescoreNeeded( SearchContext $searchContext 
) {
diff --git a/includes/Query/FullTextSimpleMatchQueryBuilder.php 
b/includes/Query/FullTextSimpleMatchQueryBuilder.php
index 9ffd90a..e476c65 100644
--- a/includes/Query/FullTextSimpleMatchQueryBuilder.php
+++ b/includes/Query/FullTextSimpleMatchQueryBuilder.php
@@ -172,7 +172,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        protected function getMultiTermRewriteMethod() {
                // Use blended freq as a rewrite method. The
diff --git a/includes/Search/CrossProjectBlockScorer.php 
b/includes/Search/CrossProjectBlockScorer.php
index 657b628..d2e0310 100644
--- a/includes/Search/CrossProjectBlockScorer.php
+++ b/includes/Search/CrossProjectBlockScorer.php
@@ -23,8 +23,7 @@
        /**
         * Reorder crossproject blocks using the $scorer
         * @param array $resultsets array of ResultSet or empty array if the 
search was disabled
-        * @param $scorer CrossProjectBlockScorer scorer to use
-        * @return array $resultsets reordered
+        * @return array ResultSet reordered
         */
        public function reorder( array $resultsets ) {
                $sortKeys = [];
diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index 01ce98e..bde76d7 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -420,7 +420,7 @@
        }
 
        /**
-        * @var string|null $type type of syntax to check, null for any type
+        * @param string|null $type type of syntax to check, null for any type
         * @return bool True when the query uses $type kind of syntax
         */
        public function isSyntaxUsed( $type = null ) {
@@ -818,7 +818,7 @@
        }
 
        /**
-        * @param string The search term with keywords removed
+        * @param string $term The search term with keywords removed
         */
        public function setCleanedSearchTerm( $term ) {
                $this->isDirty = true;
diff --git a/includes/Search/TextIndexField.php 
b/includes/Search/TextIndexField.php
index 87d0630..f80cd6d 100644
--- a/includes/Search/TextIndexField.php
+++ b/includes/Search/TextIndexField.php
@@ -171,9 +171,9 @@
 
        /**
         * Adapt the field options according to the highlighter used
-        * @var mixed[] &$field the mapping options being built
-        * @var string[] $subFields list of subfields to configure
-        * @var bool $rootField configure the root field (defaults to true)
+        * @param mixed[] &$field the mapping options being built
+        * @param string[] $subFields list of subfields to configure
+        * @param bool $rootField configure the root field (defaults to true)
         */
        protected function configureHighlighting( array &$field, array 
$subFields, $rootField = true ) {
                if ( $this->mappingFlags & 
MappingConfigBuilder::OPTIMIZE_FOR_EXPERIMENTAL_HIGHLIGHTER ) {
diff --git a/includes/SearchRequestLog.php b/includes/SearchRequestLog.php
index 3170122..30ac1fc 100644
--- a/includes/SearchRequestLog.php
+++ b/includes/SearchRequestLog.php
@@ -50,7 +50,7 @@
                $this->lastResponse = $client->getLastResponse();
        }
 
-       /*
+       /**
         * @param string[] $extra
         */
        public function setCachedResult( array $extra ) {
diff --git a/includes/SiteMatrixInterwikiResolver.php 
b/includes/SiteMatrixInterwikiResolver.php
index 2697b38..bb6ca37 100644
--- a/includes/SiteMatrixInterwikiResolver.php
+++ b/includes/SiteMatrixInterwikiResolver.php
@@ -34,7 +34,7 @@
        }
 
        /**
-        * @param $config SearchConfig
+        * @param SearchConfig $config
         * @return bool true if this resolver can run with the specified config
         */
        public static function accepts( SearchConfig $config ) {
diff --git a/phpcs.xml b/phpcs.xml
index dff1b72..ab0d08d 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,9 +6,6 @@
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
                <exclude 
name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures"
 />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" 
/>
diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php
index 3984d0e..9d5b08c 100644
--- a/tests/jenkins/Jenkins.php
+++ b/tests/jenkins/Jenkins.php
@@ -100,7 +100,7 @@
        /**
         * If the page ends in '/<language code>' then set the page's language 
to that code.
         * @param Title $title page title object
-        * @param string|Language $pageLang the page content language (either 
an object or a language code)
+        * @param string|Language &$pageLang the page content language (either 
an object or a language code)
         * @param Language $wgLang the user language
         * @return bool
         */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a7f25f6d4bdeb5994798a8c939cc94bfbe723a7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: Tjones <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to