Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 19 May 2018 21:52:00 +0000 (14:52 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 19 May 2018 22:07:25 +0000 (15:07 -0700)
...except in tests, where there's a pattern of using it in data
providers.

Change-Id: Iea15cd9c6046910b0c91044cd2aeaff1a40f4fc5

.phpcs.xml

index 2175ca7..440adaf 100644 (file)
@@ -23,7 +23,6 @@
                <exclude name="Squiz.Scope.MethodScope.Missing" />
                <exclude name="Squiz.Scope.MemberVarScope.Missing" />
                <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
-               <exclude name="MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn" />
        </rule>
        <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
                <properties>
        <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
                <exclude-pattern>*/includes/StubObject\.php</exclude-pattern>
        </rule>
+       <rule ref="MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn">
+               <exclude-pattern>*/tests/phpunit/*\.php</exclude-pattern>
+       </rule>
        <file>.</file>
        <arg name="encoding" value="UTF-8"/>
        <arg name="extensions" value="php,php5,inc,sample"/>