jenkins-bot has submitted this change and it was merged.

Change subject: build: Update MediaWiki codesniffer to 0.2.0
......................................................................


build: Update MediaWiki codesniffer to 0.2.0

Had to add ignore tags for global functions that aren't prefixed by
"wf". And fixed one spacing issue.

Change-Id: I75cf4a5ecedbb0465c3bc8f9a91ea0cfddc72ae9
---
M bin/generate-JSPHP-for-karma.php
M composer.json
M tests/index.php
M tests/phpunit/TagTest.php
4 files changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/bin/generate-JSPHP-for-karma.php b/bin/generate-JSPHP-for-karma.php
index 0d06552..1cf55de 100644
--- a/bin/generate-JSPHP-for-karma.php
+++ b/bin/generate-JSPHP-for-karma.php
@@ -16,11 +16,15 @@
 $testSuite = json_decode( $testSuiteJSON, true );
 $testSuiteOutput = array();
 
+// @codingStandardsIgnoreStart
 function new_OOUI( $class, $config = array() ) {
+       // @codingStandardsIgnoreEnd
        $class = "OOUI\\" . $class;
        return new $class( $config );
 }
+// @codingStandardsIgnoreStart
 function unstub( &$value ) {
+       // @codingStandardsIgnoreEnd
        if ( is_string( $value ) && substr( $value, 0, 13 ) === '_placeholder_' 
) {
                $value = json_decode( substr( $value, 13 ), true );
                array_walk_recursive( $value['config'], 'unstub' );
diff --git a/composer.json b/composer.json
index 9655cac..840d9eb 100644
--- a/composer.json
+++ b/composer.json
@@ -8,8 +8,7 @@
        },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.8.*",
-               "mediawiki/mediawiki-codesniffer": "0.1.0",
-               "squizlabs/php_codesniffer": "2.1.*",
+               "mediawiki/mediawiki-codesniffer": "0.2.0",
                "phpunit/phpunit": "~4.5"
        },
        "autoload": {
diff --git a/tests/index.php b/tests/index.php
index 2ddf28c..98bb464 100644
--- a/tests/index.php
+++ b/tests/index.php
@@ -43,11 +43,15 @@
 <body>
        <div id="JSPHPTestSuite" style="display: none;">
                <?php
+                       // @codingStandardsIgnoreStart
                        function new_OOUI( $class, $config = array() ) {
+                               // @codingStandardsIgnoreEnd
                                $class = "OOUI\\" . $class;
                                return new $class( $config );
                        }
+                       // @codingStandardsIgnoreStart
                        function unstub( &$value ) {
+                               // @codingStandardsIgnoreEnd
                                if ( is_string( $value ) && substr( $value, 0, 
13 ) === '_placeholder_' ) {
                                        $value = json_decode( substr( $value, 
13 ), true );
                                        array_walk_recursive( $value['config'], 
'unstub' );
diff --git a/tests/phpunit/TagTest.php b/tests/phpunit/TagTest.php
index d4e9cbd..c7ce5f0 100644
--- a/tests/phpunit/TagTest.php
+++ b/tests/phpunit/TagTest.php
@@ -11,7 +11,9 @@
  * @param mixed $item
  * @return mixed The very same $item
  */
+// @codingStandardsIgnoreStart
 function id( $item ) {
+       // @codingStandardsIgnoreEnd
        return $item;
 }
 
@@ -81,7 +83,7 @@
         * @covers Tag::toString
         * @dataProvider provideToString
         */
-       public function testToString( Tag $tag, $expected, $exception = false) {
+       public function testToString( Tag $tag, $expected, $exception = false ) 
{
                if ( $exception ) {
                        $this->setExpectedException( $exception );
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75cf4a5ecedbb0465c3bc8f9a91ea0cfddc72ae9
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to