Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 19 May 2018 20:46:54 +0000 (13:46 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 19 May 2018 21:07:03 +0000 (14:07 -0700)
Change-Id: I63761ebce04c03b9b13237919c27cc10180f198f

17 files changed:
.phpcs.xml
includes/Block.php
includes/GlobalFunctions.php
includes/Linker.php
includes/Title.php
includes/http/Http.php
includes/libs/CryptHKDF.php
includes/libs/MultiHttpClient.php
includes/parser/Parser.php
includes/parser/ParserOutput.php
includes/password/UserPasswordPolicy.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/utils/MWCryptHKDF.php
languages/Language.php
languages/LanguageConverter.php
languages/classes/LanguageKsh.php
tests/phpunit/includes/TestLogger.php

index 616fa23..b0fb6f5 100644 (file)
@@ -21,8 +21,6 @@
                <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude name="MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.SpacingDocStar" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.SpacingDocTag" />
                <exclude name="Squiz.Scope.MethodScope.Missing" />
                <exclude name="Squiz.Scope.MemberVarScope.Missing" />
                <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
index 2bae13b..2ce1f3e 100644 (file)
@@ -521,7 +521,7 @@ class Block {
         *
         * @param IDatabase $dbw If you have one available
         * @return bool|array False on failure, assoc array on success:
-        *      ('id' => block ID, 'autoIds' => array of autoblock IDs)
+        *      ('id' => block ID, 'autoIds' => array of autoblock IDs)
         */
        public function insert( $dbw = null ) {
                global $wgBlockDisablesLogin;
index 7e8df7e..c11a9bd 100644 (file)
@@ -3228,7 +3228,7 @@ function wfRunHooks( $event, array $args = [], $deprecatedVersion = null ) {
  * @param string $format The format string (See php's docs)
  * @param string $data A binary string of binary data
  * @param int|bool $length The minimum length of $data or false. This is to
- *     prevent reading beyond the end of $data. false to disable the check.
+ *     prevent reading beyond the end of $data. false to disable the check.
  *
  * Also be careful when using this function to read unsigned 32 bit integer
  * because php might make it negative.
index 5fc5eb1..5cdbfee 100644 (file)
@@ -1221,9 +1221,9 @@ class Linker {
         * @todo FIXME: Doesn't handle sub-links as in image thumb texts like the main parser
         *
         * @param string $comment Text to format links in. WARNING! Since the output of this
-        *      function is html, $comment must be sanitized for use as html. You probably want
-        *      to pass $comment through Sanitizer::escapeHtmlAllowEntities() before calling
-        *      this function.
+        *      function is html, $comment must be sanitized for use as html. You probably want
+        *      to pass $comment through Sanitizer::escapeHtmlAllowEntities() before calling
+        *      this function.
         * @param Title|null $title An optional title object used to links to sections
         * @param bool $local Whether section links should refer to local page
         * @param string|null $wikiId Id of the wiki to link to (if not the local wiki),
index 7f0dbd7..fd7451c 100644 (file)
@@ -207,8 +207,8 @@ class Title implements LinkTarget {
         * Create a new Title from a prefixed DB key
         *
         * @param string $key The database key, which has underscores
-        *      instead of spaces, possibly including namespace and
-        *      interwiki prefixes
+        *      instead of spaces, possibly including namespace and
+        *      interwiki prefixes
         * @return Title|null Title, or null on an error
         */
        public static function newFromDBkey( $key ) {
index 6eff6c9..c0005c5 100644 (file)
@@ -33,7 +33,7 @@ class Http {
         * @param string $method HTTP method. Usually GET/POST
         * @param string $url Full URL to act on. If protocol-relative, will be expanded to an http:// URL
         * @param array $options Options to pass to MWHttpRequest object.
-        *      Possible keys for the array:
+        *      Possible keys for the array:
         *    - timeout             Timeout length in seconds
         *    - connectTimeout      Timeout for connection, in seconds (curl only)
         *    - postData            An array of key-value pairs or a url-encoded form data
index 6b3e4a7..c41aab3 100644 (file)
@@ -217,7 +217,7 @@ class CryptHKDF {
         * @param string $ikm The input keying material
         * @param string $salt The salt to add to the ikm, to get the prk
         * @param string $info Optional context (change the output without affecting
-        *      the randomness properties of the output)
+        *      the randomness properties of the output)
         * @param int $L Number of bytes to return
         * @return string Cryptographically secure pseudorandom binary string
         */
index 053a5ff..654b189 100644 (file)
@@ -107,7 +107,7 @@ class MultiHttpClient implements LoggerAwareInterface {
         *   - error     : Any cURL error string
         * The map also stores integer-indexed copies of these values. This lets callers do:
         * @code
-        *              list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req );
+        *              list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req );
         * @endcode
         * @param array $req HTTP request array
         * @param array $opts
index ac20b6a..2ccd4ce 100644 (file)
@@ -2997,7 +2997,7 @@ class Parser {
         *       'expansion-depth-exceeded-category')
         * @param string|int|null $current Current value
         * @param string|int|null $max Maximum allowed, when an explicit limit has been
-        *       exceeded, provide the values (optional)
+        *       exceeded, provide the values (optional)
         */
        public function limitationWarn( $limitationType, $current = '', $max = '' ) {
                # does no harm if $current and $max are present but are unnecessary for the message
index aa015a6..fc36659 100644 (file)
@@ -906,8 +906,7 @@ class ParserOutput extends CacheTime {
         *   * To implement hidden categories, hiding pages from category listings
         *     by storing a property.
         *
-        *   * Overriding the displayed article title.
-        *   @see ParserOutput::setDisplayTitle()
+        *   * Overriding the displayed article title (ParserOutput::setDisplayTitle()).
         *
         *   * To implement image tagging, for example displaying an icon on an
         *     image thumbnail to indicate that it is listed for deletion on
index bf1f8ac..0c52354 100644 (file)
@@ -68,7 +68,7 @@ class UserPasswordPolicy {
         * @param User $user who's policy we are checking
         * @param string $password the password to check
         * @return Status error to indicate the password didn't meet the policy, or fatal to
-        *      indicate the user shouldn't be allowed to login.
+        *      indicate the user shouldn't be allowed to login.
         */
        public function checkUserPassword( User $user, $password ) {
                $effectivePolicy = $this->getPoliciesForUser( $user );
@@ -88,7 +88,7 @@ class UserPasswordPolicy {
         * @param string $password the password to check
         * @param array $groups list of groups to which we assume the user belongs
         * @return Status error to indicate the password didn't meet the policy, or fatal to
-        *      indicate the user shouldn't be allowed to login.
+        *      indicate the user shouldn't be allowed to login.
         */
        public function checkUserPasswordForGroups( User $user, $password, array $groups ) {
                $effectivePolicy = self::getPoliciesForGroups(
index 2e3c6fc..8142ff5 100644 (file)
@@ -171,10 +171,10 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
         * Optimize the dependency tree in $this->modules.
         *
         * The optimization basically works like this:
-        *      Given we have module A with the dependencies B and C
-        *              and module B with the dependency C.
-        *      Now we don't have to tell the client to explicitly fetch module
-        *              C as that's already included in module B.
+        *      Given we have module A with the dependencies B and C
+        *              and module B with the dependency C.
+        *      Now we don't have to tell the client to explicitly fetch module
+        *              C as that's already included in module B.
         *
         * This way we can reasonably reduce the amount of module registration
         * data send to the client.
index 1c8d486..d0fe6cc 100644 (file)
@@ -67,7 +67,7 @@ class MWCryptHKDF {
         * @param string $ikm The input keying material
         * @param string $salt The salt to add to the ikm, to get the prk
         * @param string $info Optional context (change the output without affecting
-        *      the randomness properties of the output)
+        *      the randomness properties of the output)
         * @param int $L Number of bytes to return
         * @return string Cryptographically secure pseudorandom binary string
         */
index d750f7d..705c728 100644 (file)
@@ -792,11 +792,11 @@ class Language {
        /**
         * Get an array of language names, indexed by code.
         * @param null|string $inLanguage Code of language in which to return the names
-        *              Use null for autonyms (native names)
+        *              Use null for autonyms (native names)
         * @param string $include One of:
-        *              'all' all available languages
-        *              'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
-        *              'mwfile' only if the language is in 'mw' *and* has a message file
+        *              'all' all available languages
+        *              'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
+        *              'mwfile' only if the language is in 'mw' *and* has a message file
         * @return array Language code => language name
         * @since 1.20
         */
@@ -3485,7 +3485,7 @@ class Language {
         * @param int $length Maximum length (including ellipsis)
         * @param string $ellipsis String to append to the truncated text
         * @param bool $adjustLength Subtract length of ellipsis from $length.
-        *      $adjustLength was introduced in 1.18, before that behaved as if false.
+        *      $adjustLength was introduced in 1.18, before that behaved as if false.
         * @return string
         */
        function truncate( $string, $length, $ellipsis = '...', $adjustLength = true ) {
index f611358..d11838a 100644 (file)
@@ -967,11 +967,11 @@ class LanguageConverter {
         * Parse the conversion table stored in the cache.
         *
         * The tables should be in blocks of the following form:
-        *              -{
-        *                      word => word ;
-        *                      word => word ;
-        *                      ...
-        *              }-
+        *              -{
+        *                      word => word ;
+        *                      word => word ;
+        *                      ...
+        *              }-
         *
         * To make the tables more manageable, subpages are allowed
         * and will be parsed recursively if $recursive == true.
index 0185a03..2269009 100644 (file)
@@ -52,28 +52,28 @@ class LanguageKsh extends Language {
         * Word order is irrelevant.
         *
         * Possible values specifying the grammatical case are:
-        *      1, Nominative
-        *      2, Genitive
-        *      3, Dative
-        *      4, Accusative, -omitted-
+        *      1, Nominative
+        *      2, Genitive
+        *      3, Dative
+        *      4, Accusative, -omitted-
         *
         * Possible values specifying the article type are:
-        *      Betoont               focussed or stressed article
-        *      -omitted-             unstressed or unfocussed article
+        *      Betoont               focussed or stressed article
+        *      -omitted-             unstressed or unfocussed article
         *
         * Possible values for the type of genitive are:
-        *      Sing, Iehr            prepositioned genitive = possessive dative
-        *      Vun, Fon, -omitted-   postpositioned genitive = preposition "vun" with dative
+        *      Sing, Iehr            prepositioned genitive = possessive dative
+        *      Vun, Fon, -omitted-   postpositioned genitive = preposition "vun" with dative
         *
         * Values of case overrides & prepositions, in the order of preceedence:
-        *      Sing, Iehr            possessive dative = prepositioned genitive
-        *      Vun, Fon              preposition "vun" with dative = postpositioned genitive
-        *      En, em                preposition "en" with dative
+        *      Sing, Iehr            possessive dative = prepositioned genitive
+        *      Vun, Fon              preposition "vun" with dative = postpositioned genitive
+        *      En, em                preposition "en" with dative
         *
         * Values for object gender specifiers of the possessive dative, or
         * prepositioned genitive, evaluated with "Sing, Iehr" of above only:
-        *      Male                  a singular male object follows
-        *      -omitted-             a non-male or plural object follows
+        *      Male                  a singular male object follows
+        *      -omitted-             a non-male or plural object follows
         *
         * We currently handle definite articles of the singular only.
         * There is a full set of test cases at:
index 21d1bf2..17a4182 100644 (file)
@@ -40,8 +40,8 @@ class TestLogger extends \Psr\Log\AbstractLogger {
         * @param bool $collect Whether to collect logs. @see setCollect()
         * @param callable $filter Filter logs before collecting/printing. Signature is
         *  string|null function ( string $message, string $level, array $context );
-        * @param bool $collectContext Whether to keep the context passed to log.
-        *                             @since 1.29 @see setCollectContext()
+        * @param bool $collectContext Whether to keep the context passed to log
+        *             (since 1.29, @see setCollectContext()).
         */
        public function __construct( $collect = false, $filter = null, $collectContext = false ) {
                $this->collect = $collect;