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

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.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle

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

Change-Id: I1074884ab6810dd082b1baebb25d02b997424818
---
M common/Common.php
M composer.json
M engines/LuaCommon/LuaCommon.php
M engines/LuaCommon/SiteLibrary.php
M engines/LuaCommon/UstringLibrary.php
M phpcs.xml
6 files changed, 16 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/89/371389/1

diff --git a/common/Common.php b/common/Common.php
index c6f089e..5a2a6dc 100644
--- a/common/Common.php
+++ b/common/Common.php
@@ -85,7 +85,7 @@
         *
         * @param Title $title
         * @param Title &$forModule Module for which this is a doc page
-        * @return boolean
+        * @return bool
         */
        public static function isDocPage( Title $title, Title &$forModule = 
null ) {
                $docPage = wfMessage( 'scribunto-doc-page-name' 
)->inContentLanguage();
diff --git a/composer.json b/composer.json
index 3550b4b..88f5db9 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
        },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.1",
+               "mediawiki/mediawiki-codesniffer": "0.11.0",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
diff --git a/engines/LuaCommon/LuaCommon.php b/engines/LuaCommon/LuaCommon.php
index 56605bb..33f8b37 100644
--- a/engines/LuaCommon/LuaCommon.php
+++ b/engines/LuaCommon/LuaCommon.php
@@ -310,7 +310,7 @@
        /**
         * Format the logged data for HTML output
         * @param string $logs Logged data
-        * @param boolean $localize Whether to localize the message key
+        * @param bool $localize Whether to localize the message key
         * @return string HTML
         */
        protected function formatHtmlLogs( $logs, $localize ) {
diff --git a/engines/LuaCommon/SiteLibrary.php 
b/engines/LuaCommon/SiteLibrary.php
index 9941aa5..68e8bae 100644
--- a/engines/LuaCommon/SiteLibrary.php
+++ b/engines/LuaCommon/SiteLibrary.php
@@ -65,7 +65,7 @@
                        foreach ( $aliases as $title => $ns ) {
                                if ( !isset( $namespacesByName[$title] ) && 
isset( $namespaces[$ns] ) ) {
                                        $ct = count( 
$namespaces[$ns]['aliases'] );
-                                       $namespaces[$ns]['aliases'][$ct+1] = 
$title;
+                                       $namespaces[$ns]['aliases'][$ct + 1] = 
$title;
                                        $namespacesByName[$title] = $ns;
                                }
                        }
diff --git a/engines/LuaCommon/UstringLibrary.php 
b/engines/LuaCommon/UstringLibrary.php
index ee3a431..d651672 100644
--- a/engines/LuaCommon/UstringLibrary.php
+++ b/engines/LuaCommon/UstringLibrary.php
@@ -210,9 +210,9 @@
                if ( count( $args ) > $this->stringLengthLimit ) {
                        throw new Scribunto_LuaError( "too many arguments to 
'$name'" );
                }
-               foreach ( $args as $k=>&$v ) {
+               foreach ( $args as $k => &$v ) {
                        if ( !is_numeric( $v ) ) {
-                               $this->checkType( 'char', $k+1, $v, 'number' );
+                               $this->checkType( 'char', $k + 1, $v, 'number' 
);
                        }
                        $v = (int)floor( $v );
                        if ( $v < 0 || $v > 0x10ffff ) {
@@ -492,8 +492,8 @@
                        } elseif ( $i + 2 < $len &&
                                $pat[$i + 1] === '-' && $pat[$i + 2] !== ']' && 
$pat[$i + 2] !== '%'
                        ) {
-                               if ( $pat[$i] <= $pat[$i+2] ) {
-                                       $re .= preg_quote( $pat[$i], '/' ) . 
'-' . preg_quote( $pat[$i+2], '/' );
+                               if ( $pat[$i] <= $pat[$i + 2] ) {
+                                       $re .= preg_quote( $pat[$i], '/' ) . 
'-' . preg_quote( $pat[$i + 2], '/' );
                                }
                                $i += 2;
                        } else {
diff --git a/phpcs.xml b/phpcs.xml
index 7514b23..d21915c 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,10 +1,16 @@
 <?xml version="1.0"?>
 <ruleset name="Scribunto">
        <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.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+               <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
                <exclude 
name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures"
 />
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
-               <exclude name="MediaWiki.Commenting.FunctionComment"/>
-               <exclude name="MediaWiki.Usage.ReferenceThis.Found"/>
        </rule>
        <file>.</file>
        <arg name="extensions" value="php" />

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1074884ab6810dd082b1baebb25d02b997424818
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
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