Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403721 )

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

Improve some parameter docs

Change-Id: I4962326963f80afa0c295121c82b0f53dff4740e
---
M .phpcs.xml
M includes/Query/CompSuggestQueryBuilder.php
M includes/Query/NearMatchQueryBuilder.php
M includes/Query/PrefixSearchQueryBuilder.php
M maintenance/saneitizeJobs.php
M tests/unit/Maintenance/AnalysisConfigBuilderTest.php
M tests/unit/Query/FullTextQueryStringQueryBuilder.php
M tests/unit/Query/QueryHelperTest.php
M tests/unit/SearcherTest.php
M tests/unit/SuggestScoringTest.php
10 files changed, 16 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/21/403721/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 124fc11..a700742 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,7 +6,6 @@
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude 
name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures"
 />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
diff --git a/includes/Query/CompSuggestQueryBuilder.php 
b/includes/Query/CompSuggestQueryBuilder.php
index 2a0c19b..fbd0f92 100644
--- a/includes/Query/CompSuggestQueryBuilder.php
+++ b/includes/Query/CompSuggestQueryBuilder.php
@@ -201,7 +201,7 @@
         *
         * @param CompletionResultsCollector $collector
         * @param ResultSet $results
-        * @param $indexName
+        * @param string $indexName
         * @return int total hits
         */
        public function postProcess( CompletionResultsCollector $collector, 
ResultSet $results, $indexName ) {
diff --git a/includes/Query/NearMatchQueryBuilder.php 
b/includes/Query/NearMatchQueryBuilder.php
index ddd8164..4cf0a25 100644
--- a/includes/Query/NearMatchQueryBuilder.php
+++ b/includes/Query/NearMatchQueryBuilder.php
@@ -13,7 +13,7 @@
 
        /**
         * @param SearchContext $searchContext the search context
-        * @param $term string the original search term
+        * @param string $term the original search term
         * @throws \ApiUsageException if the query is too long
         */
        public function build( SearchContext $searchContext, $term ) {
diff --git a/includes/Query/PrefixSearchQueryBuilder.php 
b/includes/Query/PrefixSearchQueryBuilder.php
index cacbbb3..07bc595 100644
--- a/includes/Query/PrefixSearchQueryBuilder.php
+++ b/includes/Query/PrefixSearchQueryBuilder.php
@@ -16,7 +16,7 @@
 
        /**
         * @param SearchContext $searchContext the search context
-        * @param $term string the original search term
+        * @param string $term the original search term
         * @param array|null $variants list of variants
         * @throws \ApiUsageException if the query is too long
         */
diff --git a/maintenance/saneitizeJobs.php b/maintenance/saneitizeJobs.php
index 65a99bc..f1c1f1f 100644
--- a/maintenance/saneitizeJobs.php
+++ b/maintenance/saneitizeJobs.php
@@ -307,8 +307,8 @@
        }
 
        /**
-        * @param $lastLoop int|null last loop start time
-        * @param $minLoopDuration int minimal duration of a loop
+        * @param int|null $lastLoop last loop start time
+        * @param int $minLoopDuration minimal duration of a loop
         * @return bool true if minLoopDuration is not reached false otherwize
         */
        private function checkMinLoopDuration( $lastLoop, $minLoopDuration ) {
diff --git a/tests/unit/Maintenance/AnalysisConfigBuilderTest.php 
b/tests/unit/Maintenance/AnalysisConfigBuilderTest.php
index 9f11ee7..fcd8aa4 100644
--- a/tests/unit/Maintenance/AnalysisConfigBuilderTest.php
+++ b/tests/unit/Maintenance/AnalysisConfigBuilderTest.php
@@ -394,8 +394,8 @@
         *  the results of generation obvious and tracked in git
         *
         * @dataProvider provideLanguageAnalysis
-        * @param $expected
-        * @param $langCode
+        * @param mixed $expected
+        * @param string $langCode
         * @param array $extraConfig
         */
        public function testLanguageAnalysis( $expected, $langCode, array 
$extraConfig ) {
diff --git a/tests/unit/Query/FullTextQueryStringQueryBuilder.php 
b/tests/unit/Query/FullTextQueryStringQueryBuilder.php
index a4503ef..55aa9a4 100644
--- a/tests/unit/Query/FullTextQueryStringQueryBuilder.php
+++ b/tests/unit/Query/FullTextQueryStringQueryBuilder.php
@@ -123,6 +123,8 @@
 
        /**
         * @dataProvider syntaxUsedProvider
+        * @param string $term
+        * @param array $expected
         */
        public function testSyntaxUsed( $term, $expected ) {
                // To make things a little more consistent with how it is
diff --git a/tests/unit/Query/QueryHelperTest.php 
b/tests/unit/Query/QueryHelperTest.php
index ccd37db..85e763f 100644
--- a/tests/unit/Query/QueryHelperTest.php
+++ b/tests/unit/Query/QueryHelperTest.php
@@ -11,10 +11,10 @@
        /**
         * @dataProvider provideMatchPage
         *
-        * @param $expected
-        * @param $field
-        * @param $title
-        * @param $underscores
+        * @param mixed $expected
+        * @param string $field
+        * @param string $title
+        * @param string $underscores
         */
        public function testMatchPage( $expected, $field, $title, $underscores 
) {
                $match = QueryHelper::matchPage( $field, $title, $underscores );
diff --git a/tests/unit/SearcherTest.php b/tests/unit/SearcherTest.php
index 1efaa40..bb41f3a 100644
--- a/tests/unit/SearcherTest.php
+++ b/tests/unit/SearcherTest.php
@@ -236,8 +236,8 @@
 
        /**
         * @dataProvider archiveFixtureProvider
-        * @param $expected
-        * @param $query
+        * @param mixed $expected
+        * @param array $query
         */
        public function testArchiveQuery( $expected, $query ) {
                $this->setMwGlobals( [
diff --git a/tests/unit/SuggestScoringTest.php 
b/tests/unit/SuggestScoringTest.php
index 22ade31..68cfa6d 100644
--- a/tests/unit/SuggestScoringTest.php
+++ b/tests/unit/SuggestScoringTest.php
@@ -343,7 +343,7 @@
        }
 
        /**
-        * @param $max integer max element in the array
+        * @param int $max max element in the array
         * @return array|null randomly null or an array of size [0, $max]
         */
        private function randomArray( $max ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4962326963f80afa0c295121c82b0f53dff4740e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to