Merge "Re-enable Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 26 Sep 2015 15:20:18 +0000 (15:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 26 Sep 2015 15:20:18 +0000 (15:20 +0000)
includes/deferred/DataUpdate.php
includes/deferred/LinksDeletionUpdate.php
includes/installer/Installer.php
languages/messages/MessagesDty.php
phpcs.xml
tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
tests/phpunit/includes/utils/BatchRowUpdateTest.php

index f5d6845..9cbb62f 100644 (file)
@@ -152,4 +152,5 @@ interface EnqueueableDataUpdate {
         * Push the update into the job queue
         */
        public function enqueueUpdate();
-}
\ No newline at end of file
+}
+
index bbdfcf1..7351e4c 100644 (file)
@@ -102,4 +102,5 @@ class LinksDeletionUpdate extends SqlDataUpdate {
                        }
                }
        }
-}
\ No newline at end of file
+}
+
index 72e11db..d98ca79 100644 (file)
@@ -538,9 +538,11 @@ abstract class Installer {
                global $wgAutoloadClasses;
                $wgAutoloadClasses = array();
 
+               // @codingStandardsIgnoreStart
                // LocalSettings.php should not call functions, except wfLoadSkin/wfLoadExtensions
                // Define the required globals here, to ensure, the functions can do it work correctly.
                global $wgExtensionDirectory, $wgStyleDirectory;
+               // @codingStandardsIgnoreEnd
 
                MediaWiki\suppressWarnings();
                $_lsExists = file_exists( "$IP/LocalSettings.php" );
index f90746c..937b1bc 100644 (file)
@@ -8,4 +8,5 @@
  *
  */
 
-$fallback = 'ne';
\ No newline at end of file
+$fallback = 'ne';
+
index 08ea183..69e988b 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -9,13 +9,10 @@
                <exclude name="MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceAfterOpenParenthesis"/>
                <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
                <exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed"/>
-               <exclude name="MediaWiki.VariableAnalysis.UnusedGlobalVariables"/>
                <exclude name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect"/>
                <exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
                <exclude name="PSR2.Methods.MethodDeclaration.AbstractAfterVisibility"/>
-               <exclude name="Generic.Files.EndFileNewline.NotFound"/>
                <exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
-               <exclude name="PSR2.Methods.MethodDeclaration.StaticBeforeVisibility"/>
                <exclude name="Squiz.WhiteSpace.ScopeClosingBrace.Indent"/>
                <exclude name="Squiz.WhiteSpace.SemicolonSpacing.Incorrect"/>
        </rule>
index a618889..adcbe74 100644 (file)
@@ -145,4 +145,5 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
                        )
                );
        }
-}
\ No newline at end of file
+}
+
index a2b35f3..4684658 100644 (file)
@@ -23,7 +23,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
                $writer->write( $updates );
        }
 
-       static protected function mockUpdate( array $changes ) {
+       protected static function mockUpdate( array $changes ) {
                static $i = 0;
                return array(
                        'primaryKey' => array( 'event_id' => $i++ ),
@@ -53,7 +53,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
                $this->assertEquals( count( $response ) - 1, $pos );
        }
 
-       static public function provider_readerGetPrimaryKey() {
+       public static function provider_readerGetPrimaryKey() {
                $row = array(
                        'id_field' => 42,
                        'some_col' => 'dvorak',
@@ -84,7 +84,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $reader->extractPrimaryKeys( (object) $row ), $message );
        }
 
-       static public function provider_readerSetFetchColumns() {
+       public static function provider_readerSetFetchColumns() {
                return array(
 
                        array(
@@ -136,7 +136,7 @@ class BatchRowUpdateTest extends MediaWikiTestCase {
                $reader->rewind();
        }
 
-       static public function provider_readerSelectConditions() {
+       public static function provider_readerSelectConditions() {
                return array(
 
                        array(