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

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

Also added "composer fix" command.

Change-Id: Ie065bfb1129835599e8ef4fdb24159157f2033b9
---
M composer.json
M phpcs.xml
M src/ScopedCallback.php
M tests/ScopedCallbackTest.php
4 files changed, 13 insertions(+), 6 deletions(-)

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



diff --git a/composer.json b/composer.json
index 7ccd7a5..8b8284a 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,9 @@
                }
        ],
        "autoload": {
-               "classmap": ["src/"]
+               "classmap": [
+                       "src/"
+               ]
        },
        "require": {
                "php": ">=5.5.9"
@@ -18,13 +20,16 @@
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "phpunit/phpunit": "4.8.27",
-               "mediawiki/mediawiki-codesniffer": "0.7.2"
+               "mediawiki/mediawiki-codesniffer": "0.12.0"
        },
        "scripts": {
                "test": [
                        "parallel-lint . --exclude vendor",
                        "phpunit",
                        "phpcs -p -s"
+               ],
+               "fix": [
+                       "phpcbf"
                ]
        }
 }
diff --git a/phpcs.xml b/phpcs.xml
index 06c43bc..6100ee9 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
 <ruleset>
-       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+       </rule>
        <file>.</file>
        <arg name="encoding" value="UTF-8"/>
        <arg name="extensions" value="php"/>
diff --git a/src/ScopedCallback.php b/src/ScopedCallback.php
index 16d475e..ab9e1be 100644
--- a/src/ScopedCallback.php
+++ b/src/ScopedCallback.php
@@ -50,7 +50,7 @@
         * Trigger a scoped callback and destroy it.
         * This is the same as just setting it to null.
         *
-        * @param ScopedCallback $sc
+        * @param ScopedCallback &$sc
         */
        public static function consume( ScopedCallback &$sc = null ) {
                $sc = null;
@@ -59,7 +59,7 @@
        /**
         * Destroy a scoped callback without triggering it.
         *
-        * @param ScopedCallback $sc
+        * @param ScopedCallback &$sc
         */
        public static function cancel( ScopedCallback &$sc = null ) {
                if ( $sc ) {
diff --git a/tests/ScopedCallbackTest.php b/tests/ScopedCallbackTest.php
index 7daa93f..f4c1f72 100644
--- a/tests/ScopedCallbackTest.php
+++ b/tests/ScopedCallbackTest.php
@@ -43,7 +43,7 @@
 
        public function testParams() {
                $params = [ 'foo', 'bar', 'baz' ];
-               $sc = new ScopedCallback( function( /*...*/ ) {
+               $sc = new ScopedCallback( function () {
                        $this->assertSame( [ 'foo', 'bar', 'baz' ], 
func_get_args() );
                }, $params );
                ScopedCallback::consume( $sc );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie065bfb1129835599e8ef4fdb24159157f2033b9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/libs/ScopedCallback
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <tools.libraryupgra...@tools.wmflabs.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
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