Enable PSR2.Methods.MethodDeclaration.Underscore
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 3 Oct 2015 18:52:31 +0000 (20:52 +0200)
committerAmire80 <amir.aharoni@mail.huji.ac.il>
Tue, 6 Oct 2015 16:56:56 +0000 (16:56 +0000)
Whitelist StubObject because the underscore is for internal use.

Change-Id: I4beeee8df8cde079b810a372539e3c169e80f2d3

phpcs.xml

index a4fb301..16d92be 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,7 +2,6 @@
 <ruleset name="MediaWiki">
        <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <!-- Disable failing rules -->
-               <exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
                <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
                <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment"/>
        </rule>
@@ -22,6 +21,9 @@
        <rule ref="Generic.Files.LineLength">
                <exclude-pattern>*/languages/messages/Messages*.php</exclude-pattern>
        </rule>
+       <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
+               <exclude-pattern>*/includes/StubObject.php</exclude-pattern>
+       </rule>
        <exclude-pattern>node_modules</exclude-pattern>
        <exclude-pattern>vendor</exclude-pattern>
        <exclude-pattern>extensions</exclude-pattern>