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

Change subject: Re-enable 
MediaWiki.Commenting.FunctionComment.MissingParamComment sniff
......................................................................


Re-enable MediaWiki.Commenting.FunctionComment.MissingParamComment sniff

Also renames $action to $name in APIQueryExtracts.php, because trying to
document the parameter revealed that "action" doesn't match the use of
the parameter.

Bug: T170580
Change-Id: I1b7f3f0e17b118ea9bcfd28c69321aa692aad4e3
---
M .phpcs.xml
M includes/ApiQueryExtracts.php
M includes/ExtractFormatter.php
M includes/Hooks.php
4 files changed, 10 insertions(+), 11 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jdlrobson: Looks good to me, approved



diff --git a/.phpcs.xml b/.phpcs.xml
index b15894e..1dc29a9 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0"?>
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
        </rule>
diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index bd41ad1..92ec8c5 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -288,13 +288,13 @@
        }
 
        /**
-        * @param \ApiQuery $query
-        * @param string $action
+        * @param \ApiQuery $query API query module
+        * @param string $name Name of this query module
         * @return ApiQueryExtracts
         */
-       public static function factory( $query, $action ) {
+       public static function factory( $query, $name ) {
                $config = 
MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 
'textextracts' );
-               return new self( $query, $action, $config );
+               return new self( $query, $name, $config );
        }
 
        /**
diff --git a/includes/ExtractFormatter.php b/includes/ExtractFormatter.php
index f1d5f0a..d127f43 100644
--- a/includes/ExtractFormatter.php
+++ b/includes/ExtractFormatter.php
@@ -33,7 +33,7 @@
        /**
         * @param string $text Text to convert
         * @param bool $plainText Whether extract should be plaintext
-        * @param Config $config
+        * @param Config $config Configuration object
         */
        public function __construct( $text, $plainText, Config $config ) {
                parent::__construct( HtmlFormatter::wrapHTML( $text ) );
@@ -74,8 +74,8 @@
        /**
         * Returns no more than the given number of sentences
         *
-        * @param string $text
-        * @param int $requestedSentenceCount
+        * @param string $text Source text to extract from
+        * @param int $requestedSentenceCount Maximum number of sentences to 
extract
         * @return string
         */
        public static function getFirstSentences( $text, 
$requestedSentenceCount ) {
@@ -113,8 +113,8 @@
        /**
         * Returns no more than a requested number of characters, preserving 
words
         *
-        * @param string $text
-        * @param int $requestedLength
+        * @param string $text Source text to extract from
+        * @param int $requestedLength Maximum number of characters to return
         * @return string
         */
        public static function getFirstChars( $text, $requestedLength ) {
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 7503587..9b394e4 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -12,7 +12,7 @@
 
        /**
         * ApiOpenSearchSuggest hook handler
-        * @param array &$results
+        * @param array &$results Array of search results
         * @return bool
         */
        public static function onApiOpenSearchSuggest( &$results ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b7f3f0e17b118ea9bcfd28c69321aa692aad4e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Pppery <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Pmiazga <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to