Fixed spacing
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 30 Oct 2014 16:50:19 +0000 (17:50 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 30 Oct 2014 16:50:19 +0000 (17:50 +0100)
- Changed spaces to tabs for indentation
- space after 'function'/'if'
- Added/Removed space after parenthesis/brackets/end of line
- Removed space after cast

Change-Id: I0e8e6a19b84b5e1308b632a0266cb78f688494ee

includes/GlobalFunctions.php
includes/api/ApiFormatBase.php
includes/api/ApiMain.php
includes/db/ORMTable.php
includes/debug/logger/legacy/Logger.php
includes/debug/logger/legacy/Spi.php
includes/debug/logger/monolog/Handler.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/specials/SpecialImport.php
includes/specials/SpecialNewpages.php
tests/phpunit/includes/TestUser.php

index cc7086c..261cb92 100644 (file)
@@ -3709,7 +3709,7 @@ function wfWaitForSlaves(
        // Figure out which clusters need to be checked
        $lbs = array();
        if ( $cluster === '*' ) {
-               wfGetLBFactory()->forEachLB( function( LoadBalancer $lb ) use ( &$lbs ) {
+               wfGetLBFactory()->forEachLB( function ( LoadBalancer $lb ) use ( &$lbs ) {
                        $lbs[] = $lb;
                } );
        } elseif ( $cluster !== false ) {
index 230a340..913b8eb 100644 (file)
@@ -164,8 +164,8 @@ abstract class ApiFormatBase extends ApiBase {
                        $out->setPageTitle( $context->msg( 'api-format-title' ) );
 
                        $header = $context->msg( 'api-format-prettyprint-header' )
-                          ->params( $format, strtolower( $format ) )
-                          ->parseAsBlock();
+                               ->params( $format, strtolower( $format ) )
+                               ->parseAsBlock();
                        $out->addHTML(
                                Html::rawElement( 'div', array( 'class' => 'api-pretty-header' ),
                                        ApiHelp::fixHelpLinks( $header )
index 472f753..f7588a3 100644 (file)
@@ -310,7 +310,7 @@ class ApiMain extends ApiBase {
                        // then there's an appropriate Vary header set by whatever set
                        // their non-default language.
                        wfDebug( __METHOD__ . ": downgrading cache mode 'public' to " .
-                          "'anon-public-user-private' due to uselang=user\n" );
+                               "'anon-public-user-private' due to uselang=user\n" );
                        $mode = 'anon-public-user-private';
                }
 
index 1868073..b22df39 100644 (file)
@@ -800,7 +800,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
        private function stripFieldPrefix( array $fieldNames ) {
                $start = strlen( $this->fieldPrefix );
 
-               return array_map( function( $fieldName ) use ( $start ) {
+               return array_map( function ( $fieldName ) use ( $start ) {
                        return substr( $fieldName, $start );
                }, $fieldNames );
        }
index ff6336b..a19bcc9 100644 (file)
@@ -83,7 +83,7 @@ class MWLoggerLegacyLogger extends \Psr\Log\AbstractLogger {
                if ( $channel === 'wfLogDBError' ) {
                        // wfLogDBError messages are emitted if a database log location is
                        // specfied.
-                       $shouldEmit = (bool) $wgDBerrorLog;
+                       $shouldEmit = (bool)$wgDBerrorLog;
 
                } elseif ( $channel === 'wfErrorLog' ) {
                        // All messages on the wfErrorLog channel should be emitted.
index 51e14a2..a3d34fa 100644 (file)
@@ -50,7 +50,7 @@ class MWLoggerLegacySpi implements MWLoggerSpi {
         */
        public function getLogger( $channel ) {
                if ( !isset( $this->singletons[$channel] ) ) {
-                       $this->singletons[$channel] = new MWLoggerLegacyLogger($channel);
+                       $this->singletons[$channel] = new MWLoggerLegacyLogger( $channel );
                }
                return $this->singletons[$channel];
        }
index 1472459..02ab309 100644 (file)
@@ -168,7 +168,7 @@ class MWLoggerMonologHandler extends \Monolog\Handler\AbstractProcessingHandler
                        $this->openSink();
                }
 
-               $text = (string) $record['formatted'];
+               $text = (string)$record['formatted'];
                if ( $this->useUdp() ) {
 
                        // Clean it up for the multiplexer
index d4e8159..bcef149 100644 (file)
@@ -993,7 +993,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        $localPath = $this->getLocalPath( $templatePath );
                        if ( file_exists( $localPath ) ) {
                                $content = file_get_contents( $localPath );
-                               $templates[ $alias ] = $content;
+                               $templates[$alias] = $content;
                        } else {
                                $msg = __METHOD__ . ": template file not found: \"$localPath\"";
                                wfDebugLog( 'resourceloader', $msg );
index 3d762aa..05bb607 100644 (file)
@@ -251,7 +251,7 @@ class SpecialImport extends SpecialPage {
                                        Xml::label( $this->msg( 'import-comment' )->text(), 'mw-import-comment' ) .
                                        "</td>
                                        <td class='mw-input'>" .
-                                       Xml::input( 'log-comment', 50, 
+                                       Xml::input( 'log-comment', 50,
                                                ( $this->sourceName == 'upload' ? $this->logcomment : '' ),
                                                array( 'id' => 'mw-import-comment', 'type' => 'text' ) ) . ' ' .
                                        "</td>
index 5b34297..ad1f051 100644 (file)
@@ -255,7 +255,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                // The form should be visible on each request (inclusive requests with submitted forms), so
                // return always false here.
                $htmlForm->setSubmitCallback(
-                       function() {
+                       function () {
                                return false;
                        }
                );
index 499353e..754568d 100644 (file)
@@ -28,7 +28,7 @@ class TestUser {
 
        private function assertNotReal() {
                global $wgDBprefix;
-               if( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX && $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX ) {
+               if ( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX && $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX ) {
                        throw new MWException( "Can't create user on real database" );
                }
        }
@@ -114,9 +114,9 @@ class TestUser {
                $passwordFactory = $this->user->getPasswordFactory();
                $oldDefaultType = $passwordFactory->getDefaultType();
 
-                // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
+               // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
                $passwordFactory->setDefaultType( 'A' );
-               $newPassword = $passwordFactory->newFromPlaintext( $password , $this->user->getPassword() );
+               $newPassword = $passwordFactory->newFromPlaintext( $password, $this->user->getPassword() );
 
                $change = false;
                if ( !$this->user->getPassword()->equals( $newPassword ) ) {