Re-enable MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect
authorReedy <reedy@wikimedia.org>
Sat, 26 Sep 2015 17:04:00 +0000 (18:04 +0100)
committerReedy <reedy@wikimedia.org>
Sat, 26 Sep 2015 17:32:32 +0000 (18:32 +0100)
Change-Id: I1b756909a1080108c5147d46950f826871ef6dc1

includes/HttpFunctions.php
phpcs.xml
tests/phpunit/includes/libs/RunningStatTest.php

index 5d46b5e..ad5aeb3 100644 (file)
@@ -897,7 +897,7 @@ class PhpHttpRequest extends MWHttpRequest {
                        ) );
                }
 
-               foreach( $certLocations as $key => $cert ) {
+               foreach ( $certLocations as $key => $cert ) {
                        if ( is_dir( $cert ) ) {
                                $certOptions['capath'] = $cert;
                                break;
index 8a28177..7076f60 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,7 +6,6 @@
                <exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
                <exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix"/>
                <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
-               <exclude name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect"/>
                <exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
        </rule>
        <file>.</file>
index edfaf16..35a8e4f 100644 (file)
@@ -23,7 +23,7 @@ class RunningStatTest extends PHPUnit_Framework_TestCase {
         */
        public function testRunningStatAccuracy() {
                $rstat = new RunningStat();
-               foreach( $this->points as $point ) {
+               foreach ( $this->points as $point ) {
                        $rstat->push( $point );
                }
 
@@ -51,7 +51,7 @@ class RunningStatTest extends PHPUnit_Framework_TestCase {
        public function testRunningStatMerge() {
                $expected = new RunningStat();
 
-               foreach( $this->points as $point ) {
+               foreach ( $this->points as $point ) {
                        $expected->push( $point );
                }
 
@@ -60,13 +60,13 @@ class RunningStatTest extends PHPUnit_Framework_TestCase {
 
                // Accumulate the first half into one RunningStat object
                $first = new RunningStat();
-               foreach( $sets[0] as $point ) {
+               foreach ( $sets[0] as $point ) {
                        $first->push( $point );
                }
 
                // Accumulate the second half into another RunningStat object
                $second = new RunningStat();
-               foreach( $sets[1] as $point ) {
+               foreach ( $sets[1] as $point ) {
                        $second->push( $point );
                }