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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
......................................................................

build: Updating mediawiki/mediawiki-codesniffer to 0.11.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ExtraParamComment
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.MissingReturnType
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.SpacingAfter
* MediaWiki.Commenting.FunctionComment.WrongStyle

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment

Change-Id: Ib9fc13bd7b2462189a4e8571cf89d6ce0d415324
---
M composer.json
M includes/CentralAuthHooks.php
M includes/CentralAuthPreAuthManagerHooks.php
M includes/CentralAuthUser.php
M includes/GlobalRename/GlobalRenameUserStatus.php
M includes/api/ApiQueryGlobalUserInfo.php
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialGlobalGroupMembership.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialWikiSets.php
M phpcs.xml
11 files changed, 28 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/51/371251/1

diff --git a/composer.json b/composer.json
index bf202bf..770de83 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jakub-onderka/php-console-highlighter": "0.3.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.1"
+               "mediawiki/mediawiki-codesniffer": "0.11.0"
        },
        "scripts": {
                "fix": "phpcbf",
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index b292acd..3311bd6 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -920,7 +920,7 @@
        }
 
        /**
-        * @param integer $id User ID
+        * @param int $id User ID
         * @param User $user
         * @param SpecialPage $sp
         * @return bool
@@ -1221,7 +1221,7 @@
         * Creates a link to the global lock log
         * @param array $msg Message with a link to the global block log
         * @param string $user The username to be checked
-        * @return boolean true
+        * @return bool true
         */
        static function getBlockLogLink( &$msg, $user ) {
                if ( IP::isIPAddress( $user ) ) {
@@ -1309,7 +1309,7 @@
         * @param WebRequest $request
         * @param Title $title
         * @param OutputPage $output
-        * @return boolean
+        * @return bool
         */
        public static function onTestCanonicalRedirect( $request, $title, 
$output ) {
                return $title->getNamespace() !== NS_SPECIAL ||
diff --git a/includes/CentralAuthPreAuthManagerHooks.php 
b/includes/CentralAuthPreAuthManagerHooks.php
index 2578a42..5b98783 100644
--- a/includes/CentralAuthPreAuthManagerHooks.php
+++ b/includes/CentralAuthPreAuthManagerHooks.php
@@ -88,7 +88,7 @@
        /**
         * @param User $user
         * @param string $pass
-        * @param integer &$retval
+        * @param int &$retval
         * @param string &$msg
         * @return bool
         * @throws Exception
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index d752899..b644fcd 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -67,7 +67,7 @@
         * @note Don't call this directly. Use self::getInstanceByName() or
         *  self::getMasterInstanceByName() instead.
         * @param string $username
-        * @param integer $flags Supports CentralAuthUser::READ_LATEST to use 
the master DB
+        * @param int $flags Supports CentralAuthUser::READ_LATEST to use the 
master DB
         */
        public function __construct( $username, $flags = 0 ) {
                $this->mName = $username;
@@ -353,7 +353,7 @@
 
        /**
         * Lazy-load up the most commonly required state information
-        * @param boolean $recache Force a load from the database then save 
back to the cache
+        * @param bool $recache Force a load from the database then save back 
to the cache
         */
        protected function loadState( $recache = false ) {
                if ( $recache ) {
@@ -737,7 +737,7 @@
        }
 
        /**
-        * @return integer total number of edits for all wikis
+        * @return int total number of edits for all wikis
         */
        public function getGlobalEditCount() {
                if ( $this->mGlobalEditCount === null ) {
@@ -2252,7 +2252,7 @@
         * Not cached
         * @see CentralAuthUser::renameInProgress
         * @param string $wiki
-        * @param integer $flags Bitfield of CentralAuthUser::READ_* constants
+        * @param int $flags Bitfield of CentralAuthUser::READ_* constants
         * @return array|bool
         */
        public function renameInProgressOn( $wiki, $flags = 0 ) {
diff --git a/includes/GlobalRename/GlobalRenameUserStatus.php 
b/includes/GlobalRename/GlobalRenameUserStatus.php
index 6f5d28e..7765a66 100644
--- a/includes/GlobalRename/GlobalRenameUserStatus.php
+++ b/includes/GlobalRename/GlobalRenameUserStatus.php
@@ -96,7 +96,7 @@
         * Get a user's rename status for all wikis.
         * Returns an array ( wiki => status )
         *
-        * @param integer $flags IDBAccessObject flags
+        * @param int $flags IDBAccessObject flags
         *
         * @return array
         */
@@ -123,7 +123,7 @@
        /**
         * Get a user's rename status for the current wiki.
         *
-        * @param integer $flags IDBAccessObject flags
+        * @param int $flags IDBAccessObject flags
         *
         * @return string|null Null means no rename pending for this user on 
the current wiki (possibly
         *   because it has finished already).
diff --git a/includes/api/ApiQueryGlobalUserInfo.php 
b/includes/api/ApiQueryGlobalUserInfo.php
index 2bc0a95..5318649 100644
--- a/includes/api/ApiQueryGlobalUserInfo.php
+++ b/includes/api/ApiQueryGlobalUserInfo.php
@@ -114,7 +114,7 @@
                        }
                        $result->addValue( 'query', $this->getModuleName(), [ 
'editcount' => $editcount ] );
                }
-               if ( isset ( $prop['unattached'] ) ) {
+               if ( isset( $prop['unattached'] ) ) {
                        $accounts = $user->queryUnattached();
                        foreach ( $accounts as $account ) {
                                $a = [
diff --git a/includes/specials/SpecialCentralAuth.php 
b/includes/specials/SpecialCentralAuth.php
index b839af0..48b6150 100644
--- a/includes/specials/SpecialCentralAuth.php
+++ b/includes/specials/SpecialCentralAuth.php
@@ -511,7 +511,7 @@
         */
        private function getAttachedTimestampField( $attachedTimestamp ) {
                if ( !$attachedTimestamp ) {
-                       $html = Xml::openElement( 'td', [ 'data-sort-value' =>  
'0' ] ) .
+                       $html = Xml::openElement( 'td', [ 'data-sort-value' => 
'0' ] ) .
                                $this->msg( 'centralauth-admin-unattached' 
)->parse();
                } else {
                        $html = Xml::openElement( 'td',
diff --git a/includes/specials/SpecialGlobalGroupMembership.php 
b/includes/specials/SpecialGlobalGroupMembership.php
index 1849c3c..0b629e1 100644
--- a/includes/specials/SpecialGlobalGroupMembership.php
+++ b/includes/specials/SpecialGlobalGroupMembership.php
@@ -72,7 +72,7 @@
                        # specify addself and removeself as empty arrays -- bug 
16098
                        return [
                                'add' => $allGroups,
-                               'remove' =>  $allGroups,
+                               'remove' => $allGroups,
                                'add-self' => [],
                                'remove-self' => []
                        ];
@@ -80,7 +80,7 @@
 
                return [
                        'add' => [],
-                       'remove' =>  [],
+                       'remove' => [],
                        'add-self' => [],
                        'remove-self' => []
                ];
diff --git a/includes/specials/SpecialGlobalGroupPermissions.php 
b/includes/specials/SpecialGlobalGroupPermissions.php
index 306c63c..1d98d6c 100644
--- a/includes/specials/SpecialGlobalGroupPermissions.php
+++ b/includes/specials/SpecialGlobalGroupPermissions.php
@@ -375,7 +375,7 @@
 
                $count = count( $checkboxes );
 
-               $html =  Html::openElement( 'div', [ 'class' => 
'mw-centralauth-rights' ] )
+               $html = Html::openElement( 'div', [ 'class' => 
'mw-centralauth-rights' ] )
                        . '<ul>';
 
                foreach ( $checkboxes as $cb ) {
diff --git a/includes/specials/SpecialWikiSets.php 
b/includes/specials/SpecialWikiSets.php
index 9227b20..711e656 100644
--- a/includes/specials/SpecialWikiSets.php
+++ b/includes/specials/SpecialWikiSets.php
@@ -270,7 +270,7 @@
                $i = 0;
                $splitLists = [];
                while ( $i < $columns ) {
-                       $splitLists[$i] = array_slice( $list, $itemsPerCol*$i, 
$itemsPerCol );
+                       $splitLists[$i] = array_slice( $list, $itemsPerCol * 
$i, $itemsPerCol );
                        $i++;
                }
                $body = '';
diff --git a/phpcs.xml b/phpcs.xml
index 457f48b..18c83e3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,9 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
+               <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.Commenting.FunctionComment.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturnType" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.SpacingAfter" />
+               <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
                <exclude 
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"/>
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
-               <exclude name="MediaWiki.Commenting.FunctionComment"/>
        </rule>
        <rule ref="Generic.Files.LineLength">
                <exclude-pattern>CentralAuth\.*alias\.php</exclude-pattern>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9fc13bd7b2462189a4e8571cf89d6ce0d415324
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>

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

Reply via email to