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

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

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Also added "composer fix" command.

Change-Id: Ic810abedcbe96a4eda1f211ca9ae8b87016977cc
---
M composer.json
M phpcs.xml
M src/Functions.php
M tests/FunctionsTest.php
4 files changed, 11 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/at-ease refs/changes/49/375849/1

diff --git a/composer.json b/composer.json
index 85e98a9..d9a074a 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
        },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9",
-               "mediawiki/mediawiki-codesniffer": "0.5.0",
+               "mediawiki/mediawiki-codesniffer": "0.12.0",
                "phpunit/phpunit": "~4.5"
        },
        "scripts": {
@@ -31,6 +31,9 @@
                        "parallel-lint . --exclude vendor",
                        "phpcs -p",
                        "phpunit"
+               ],
+               "fix": [
+                       "phpcbf"
                ]
        }
 }
diff --git a/phpcs.xml b/phpcs.xml
index 2c5d9d3..cd6acd5 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,9 @@
 <?xml version="1.0"?>
 <ruleset name="at-ease">
-       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+       </rule>
        <file>.</file>
        <exclude-pattern>coverage</exclude-pattern>
        <exclude-pattern>vendor</exclude-pattern>
diff --git a/src/Functions.php b/src/Functions.php
index 0be91eb..d62505e 100644
--- a/src/Functions.php
+++ b/src/Functions.php
@@ -59,7 +59,6 @@
        suppressWarnings( true );
 }
 
-
 /**
  * Call the callback given by the first parameter, suppressing any warnings.
  *
diff --git a/tests/FunctionsTest.php b/tests/FunctionsTest.php
index 9582818..2f57f31 100644
--- a/tests/FunctionsTest.php
+++ b/tests/FunctionsTest.php
@@ -25,7 +25,7 @@
         * over in silence when enclosed in warning suppress / restore calls.
         */
        public function testWarningSuppression() {
-               $a = array();
+               $a = [];
                MediaWiki\suppressWarnings();
                $a['unsetkey'];
                MediaWiki\restoreWarnings();
@@ -59,12 +59,12 @@
 
                $this->assertEquals(
                        MediaWiki\quietCall( 
'FunctionsTest::dummyStaticMethod', 24 ),
-                       FunctionsTest::dummyStaticMethod( 24 ),
+                       self::dummyStaticMethod( 24 ),
                        'MediaWiki\quietCall() with static method'
                );
 
                $this->assertEquals(
-                       MediaWiki\quietCall( array( $this, 
'dummyInstanceMethod' ), 24 ),
+                       MediaWiki\quietCall( [ $this, 'dummyInstanceMethod' ], 
24 ),
                        $this->dummyInstanceMethod( 24 ),
                        'MediaWiki\quietCall() with instance method'
                );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic810abedcbe96a4eda1f211ca9ae8b87016977cc
Gerrit-PatchSet: 1
Gerrit-Project: at-ease
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <[email protected]>

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

Reply via email to