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

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.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName

Change-Id: I467804652ceef1b1bea99a826a9ad1402582b777
---
M composer.json
M includes/Contributors.php
M includes/ContributorsHooks.php
M includes/ContributorsTablePager.php
M includes/SpecialContributors.php
M phpcs.xml
6 files changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/composer.json b/composer.json
index 614a3f3..fb8da67 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jakub-onderka/php-console-highlighter": "0.3.2",
-               "mediawiki/mediawiki-codesniffer": "0.7.2"
+               "mediawiki/mediawiki-codesniffer": "0.11.0"
        },
        "scripts": {
                "test": [
diff --git a/includes/Contributors.php b/includes/Contributors.php
index 6d39b88..e86a2da 100644
--- a/includes/Contributors.php
+++ b/includes/Contributors.php
@@ -121,7 +121,7 @@
        private function getThresholdedContributors() {
                $dbr = wfGetDB( DB_SLAVE );
                $opts = $this->getOptions();
-               $pageId =  $this->getTarget()->getArticleID();
+               $pageId = $this->getTarget()->getArticleID();
                $contributors = [];
 
                if ( array_key_exists( 'filteranon', $opts ) && 
$opts['filteranon'] ) {
@@ -152,7 +152,7 @@
        /**
         * Checks if the target is set
         *
-        * @return boolean
+        * @return bool
         */
        public function hasTarget() {
                return is_object( $this->getTarget() );
@@ -161,7 +161,7 @@
        /**
         * Check if the target exists. Returns false if it wasn't set or does 
not exist.
         *
-        * @return boolean
+        * @return bool
         */
        public function targetExists() {
                if ( !$this->hasTarget() ) {
diff --git a/includes/ContributorsHooks.php b/includes/ContributorsHooks.php
index b09161f..5c203cc 100644
--- a/includes/ContributorsHooks.php
+++ b/includes/ContributorsHooks.php
@@ -169,7 +169,6 @@
                        );
                } else {
                        foreach ( $res as $row ) {
-
                        $dbw->upsert( 'contributors',
                                        [
                                                'cn_page_id' => $pageId,
diff --git a/includes/ContributorsTablePager.php 
b/includes/ContributorsTablePager.php
index b561b25..cfffcc5 100644
--- a/includes/ContributorsTablePager.php
+++ b/includes/ContributorsTablePager.php
@@ -43,7 +43,6 @@
                $row = $this->mCurrentRow;
 
                switch ( $field ) {
-
                        case 'cn_user_text':
                                $formatted =
                                        Linker::userLink( $row->cn_user_text, 
$row->cn_user_text ) . ' ' .
diff --git a/includes/SpecialContributors.php b/includes/SpecialContributors.php
index be76d11..9d92895 100644
--- a/includes/SpecialContributors.php
+++ b/includes/SpecialContributors.php
@@ -188,7 +188,7 @@
                                'label-message' => 'contributors-target',
                                'type' => 'title',
                                'size' => 40,
-                               'id'=> 'target',
+                               'id' => 'target',
                                'default' => 
$this->contributorsClass->getTargetText()
                        ],
                        'filteranon' => [
@@ -198,7 +198,7 @@
                                'checked' => $opts['filteranon']
                        ],
                        'pagePrefix' => [
-                               'name'=>'pagePrefix',
+                               'name' => 'pagePrefix',
                                'label-message' => 'contributors-add-subpages',
                                'type' => 'check',
                                'checked' => $opts['pagePrefix']
diff --git a/phpcs.xml b/phpcs.xml
index b859699..cbcbe54 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,14 @@
 <?xml version="1.0"?>
 <ruleset>
-       <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <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.ParamNameNoMatch" />
+               <exclude 
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
+       </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc"/>
        <arg name="encoding" value="UTF-8"/>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I467804652ceef1b1bea99a826a9ad1402582b777
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to