Fixed spacing
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 19 Jul 2014 21:12:10 +0000 (23:12 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 19 Jul 2014 21:12:10 +0000 (23:12 +0200)
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif

Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2

45 files changed:
includes/Html.php
includes/Import.php
includes/Title.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiResult.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/htmlform/HTMLSelectField.php
includes/installer/MysqlInstaller.php
includes/installer/PostgresInstaller.php
includes/installer/PostgresUpdater.php
includes/media/XCF.php
includes/objectcache/BagOStuff.php
includes/page/ImagePage.php
includes/poolcounter/PoolCounterRedis.php
includes/profiler/Profiler.php
includes/specials/SpecialContributions.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialPageLanguage.php
includes/specials/SpecialTrackingCategories.php
includes/utils/MWCryptHKDF.php
languages/messages/MessagesCs.php
languages/messages/MessagesEn.php
languages/messages/MessagesKk_arab.php
languages/messages/MessagesKk_cyrl.php
languages/messages/MessagesKk_latn.php
languages/messages/MessagesOs.php
languages/messages/MessagesSv.php
maintenance/compareParserCache.php
maintenance/language/generateCollationData.php
mw-config/index.php
skins/Vector/VectorTemplate.php
tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php
tests/phpunit/includes/ImportTest.php
tests/phpunit/includes/LinksUpdateTest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/TimeAdjustTest.php
tests/phpunit/includes/actions/ActionTest.php
tests/phpunit/includes/config/ConfigFactoryTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/debug/MWDebugTest.php
tests/phpunit/includes/media/MediaWikiMediaTestCase.php
tests/phpunit/includes/parser/ParserMethodsTest.php
tests/phpunit/includes/poolcounter/PoolCounterTest.php
tests/phpunit/phpunit.php

index 5f4655c..dbabbae 100644 (file)
@@ -502,7 +502,7 @@ class Html {
 
                                // Remove duplicates and create the string
                                $value = implode( ' ', array_unique( $value ) );
-                       } else if ( is_array( $value ) ) {
+                       } elseif ( is_array( $value ) ) {
                                throw new MWException( "HTML attribute $key can not contain a list of values" );
                        }
 
index 177d023..6aab157 100644 (file)
@@ -45,7 +45,7 @@ class WikiImporter {
        function __construct( ImportStreamSource $source ) {
                $this->reader = new XMLReader();
 
-               if ( !in_array(  'uploadsource', stream_get_wrappers() ) ) {
+               if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) {
                        stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' );
                }
                $id = UploadSourceAdapter::registerSource( $source );
index 746ffab..b66e3e4 100644 (file)
@@ -979,7 +979,7 @@ class Title {
                try {
                        $formatter = self::getTitleFormatter();
                        return $formatter->getNamespaceName( $this->mNamespace, $this->mDbkeyform );
-               } catch ( InvalidArgumentException $ex )  {
+               } catch ( InvalidArgumentException $ex ) {
                        wfDebug( __METHOD__ . ': ' . $ex->getMessage() . "\n" );
                        return false;
                }
index 089ce04..ab737d1 100644 (file)
@@ -242,7 +242,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['articlepath'] = $config->get( 'ArticlePath' );
                $data['scriptpath'] = $config->get( 'ScriptPath' );
                $data['script'] = $config->get( 'Script' );
-               $data['variantarticlepath'] = $config->get( 'VariantArticlePath'  );
+               $data['variantarticlepath'] = $config->get( 'VariantArticlePath' );
                $data['server'] = $config->get( 'Server' );
                $data['servername'] = $config->get( 'ServerName' );
                $data['wikiid'] = wfWikiID();
@@ -420,7 +420,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        }
 
                        $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
-                       if (substr( $row['iw_url'], 0, 2) == '//') {
+                       if ( substr( $row['iw_url'], 0, 2 ) == '//' ) {
                                $val['protorel'] = '';
                        }
                        if ( isset( $row['iw_wikiid'] ) ) {
index ac64cf0..97b74e5 100644 (file)
@@ -597,7 +597,7 @@ class ApiResult extends ApiBase {
                                        $this->getMain()->getRequest()->getValues(),
                                        array_flip( $this->generatorParams )
                                );
-                       } else if ( $this->generatorContinuationData ) {
+                       } elseif ( $this->generatorContinuationData ) {
                                // All the generator-using modules are complete, but the
                                // generator isn't. Continue the generator and restart the
                                // generator-using modules
index fe5fa1f..49dcbc0 100644 (file)
@@ -827,7 +827,7 @@ __INDEXATTR__;
         * In Postgres when using FOR UPDATE, only the main table and tables that are inner joined
         * can be locked. That means tables in an outer join cannot be FOR UPDATE locked. Trying to do
         * so causes a DB error. This wrapper checks which tables can be locked and adjusts it accordingly.
-        * 
+        *
         * MySQL uses "ORDER BY NULL" as an optimization hint, but that syntax is illegal in PostgreSQL.
         */
        function selectSQLText( $table, $vars, $conds = '', $fname = __METHOD__,
index 3e063c6..af687b2 100644 (file)
@@ -342,9 +342,9 @@ class DatabaseSqlite extends DatabaseBase {
         */
        function numFields( $res ) {
                $r = $res instanceof ResultWrapper ? $res->result : $res;
-               if ( is_array($r) && count( $r ) > 0 ){
+               if ( is_array( $r ) && count( $r ) > 0 ) {
                        // The size of the result array is twice the number of fields. (Bug: 65578)
-                       return count( $r[0] ) / 2 ;
+                       return count( $r[0] ) / 2;
                } else {
                        // If the result is empty return 0
                        return 0;
index 2bf9f8b..a198037 100644 (file)
@@ -29,7 +29,7 @@ class HTMLSelectField extends HTMLFormField {
 
                $allowedParams = array( 'tabindex', 'size' );
                $customParams = $this->getAttributes( $allowedParams );
-               foreach( $customParams as $name => $value ) {
+               foreach ( $customParams as $name => $value ) {
                        $select->setAttribute( $name, $value );
                }
 
index 10f6692..b82e611 100644 (file)
@@ -120,7 +120,7 @@ class MysqlInstaller extends DatabaseInstaller {
                if ( !strlen( $newValues['_InstallUser'] ) ) {
                        $status->fatal( 'config-db-username-empty' );
                }
-               if (!strlen( $newValues['_InstallPassword'] ) ) {
+               if ( !strlen( $newValues['_InstallPassword'] ) ) {
                        $status->fatal( 'config-db-password-empty', $newValues['_InstallUser'] );
                }
                if ( !$status->isOK() ) {
index 89a6978..4caf902 100644 (file)
@@ -84,7 +84,7 @@ class PostgresInstaller extends DatabaseInstaller {
        function submitConnectForm() {
                // Get variables from the request
                $newValues = $this->setVarsFromRequest( array(
-                       'wgDBserver', 'wgDBport','wgDBname', 'wgDBmwschema',
+                       'wgDBserver', 'wgDBport', 'wgDBname', 'wgDBmwschema',
                        '_InstallUser', '_InstallPassword'
                ) );
 
index 8404c2d..390b74f 100644 (file)
@@ -694,7 +694,7 @@ END;
                        $this->output( "...column '$table.$field' is already of type '$newtype'\n" );
                } else {
                        $this->output( "Purging data from cache table '$table'\n" );
-                       $this->db->query("DELETE from $table" );
+                       $this->db->query( "DELETE from $table" );
                        $this->output( "Changing column type of '$table.$field' from '{$fi->type()}' to '$newtype'\n" );
                        $sql = "ALTER TABLE $table ALTER $field TYPE $newtype";
                        if ( strlen( $default ) ) {
index b303a01..9e69137 100644 (file)
@@ -165,7 +165,7 @@ class XCFHandler extends BitmapHandler {
                        // Try to be consistent with the names used by PNG files.
                        // Unclear from base media type if it has an alpha layer,
                        // so just assume that it does since it "potentially" could.
-                       switch( $header['base_type'] ) {
+                       switch ( $header['base_type'] ) {
                        case 0:
                                $metadata['colorType'] = 'truecolour-alpha';
                                break;
index dca5f32..de3efd1 100644 (file)
@@ -46,10 +46,10 @@ abstract class BagOStuff {
        protected $lastError = self::ERR_NONE;
 
        /** Possible values for getLastError() */
-       const ERR_NONE        = 0; // no error
+       const ERR_NONE = 0; // no error
        const ERR_NO_RESPONSE = 1; // no response
        const ERR_UNREACHABLE = 2; // can't connect
-       const ERR_UNEXPECTED  = 3; // response gave some error
+       const ERR_UNEXPECTED = 3; // response gave some error
 
        /**
         * @param bool $bool
index 89ca241..9aff6ef 100644 (file)
@@ -363,7 +363,7 @@ class ImagePage extends Article {
                                                // it can be denoted as the current size being shown.
                                                // Vectorized images are "infinitely" big, so all thumb
                                                // sizes are shown.
-                                               if ( ( ($size[0] <= $width_orig && $size[1] <= $height_orig)
+                                               if ( ( ( $size[0] <= $width_orig && $size[1] <= $height_orig )
                                                                || $this->displayImg->isVectorized() )
                                                        && $size[0] != $width && $size[1] != $height
                                                ) {
index 2b37b0b..d609f61 100644 (file)
@@ -90,7 +90,7 @@ class PoolCounterRedis extends PoolCounter {
 
                $this->keySha1 = sha1( $this->key );
                $met = ini_get( 'max_execution_time' ); // usually 0 in CLI mode
-               $this->lockTTL = $met ? 2*$met : 3600;
+               $this->lockTTL = $met ? 2 * $met : 3600;
 
                if ( self::$active === null ) {
                        self::$active = array();
index 75f6966..779f8b6 100644 (file)
@@ -126,7 +126,7 @@ abstract class Profiler {
                        if ( is_array( $wgProfiler ) ) {
                                if ( !isset( $wgProfiler['class'] ) ) {
                                        $class = 'ProfilerStub';
-                               } elseif ( $wgProfiler['class'] === 'Profiler'  ) {
+                               } elseif ( $wgProfiler['class'] === 'Profiler' ) {
                                        $class = 'ProfilerStub'; // b/c; don't explode
                                } else {
                                        $class = $wgProfiler['class'];
index fefd3b5..251ac51 100644 (file)
@@ -206,7 +206,7 @@ class SpecialContributions extends IncludableSpecialPage {
                                $output = $pager->getBody();
                                if ( !$this->including() ) {
                                        $output = '<p>' . $pager->getNavigationBar() . '</p>' .
-                                               $output.
+                                               $output .
                                                '<p>' . $pager->getNavigationBar() . '</p>';
                                }
                                $out->addHTML( $output );
index 369f11f..355726a 100644 (file)
@@ -244,7 +244,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $talk = $this->msg( 'talkpagelinktext' )->escaped();
                // Do a batch existence check
                $batch = new LinkBatch();
-               if (count($titles) >= 100) {
+               if ( count( $titles ) >= 100 ) {
                        $output = wfMessage( 'watchlistedit-too-many' )->parse();
                        return;
                }
index a432f10..24eca07 100644 (file)
@@ -107,7 +107,7 @@ class SpecialPageLanguage extends FormSpecialPage {
                // Returns the default since the page is not loaded from DB
                $defLang = $title->getPageLanguage()->getCode();
 
-               $pageId =  $title->getArticleID();
+               $pageId = $title->getArticleID();
 
                // Check if article exists
                if ( !$pageId ) {
index bea65ba..73bdbd6 100644 (file)
@@ -59,7 +59,7 @@ class SpecialTrackingCategories extends SpecialPage {
                        </tr></thead>"
                );
 
-               foreach( $wgTrackingCategories as $catMsg ) {
+               foreach ( $wgTrackingCategories as $catMsg ) {
                        /*
                         * Check if the tracking category varies by namespace
                         * Otherwise only pages in the current namespace will be displayed
index 6b6655e..aa86ea4 100644 (file)
@@ -293,7 +293,7 @@ class MWCryptHKDF {
                for ( $counter = 1; $counter <= $rounds; ++$counter ) {
                        $lastK = hash_hmac(
                                $hash,
-                               $lastK . $info . chr($counter),
+                               $lastK . $info . chr( $counter ),
                                $prk,
                                true
                        );
index 2718a48..b796aca 100644 (file)
@@ -261,7 +261,7 @@ $magicWords = array(
  * Date formats list for Special:Preferences
  * see $dateFormats for definitions
  */
-$datePreferences =  array(
+$datePreferences = array(
        'ČSN basic dt',
        'ČSN padded dt',
        'ČSN basic td',
index 8167b19..6a18ea1 100644 (file)
@@ -448,7 +448,7 @@ $specialPageAliases = array(
        'PermanentLink'             => array( 'PermanentLink', 'PermaLink' ),
        'Popularpages'              => array( 'PopularPages' ),
        'Preferences'               => array( 'Preferences' ),
-       'Prefixindex'               => array( 'PrefixIndex' ) ,
+       'Prefixindex'               => array( 'PrefixIndex' ),
        'Protectedpages'            => array( 'ProtectedPages' ),
        'Protectedtitles'           => array( 'ProtectedTitles' ),
        'Randompage'                => array( 'Random', 'RandomPage' ),
index 3fcc4cc..a33efef 100644 (file)
@@ -106,8 +106,8 @@ $namespaceAliases = array(
 
        # Aliases to renamed kk-arab namespaces
        'مەدياۋيكي'        => NS_MEDIAWIKI,
-       'مەدياۋيكي_تالقىلاۋى'  => NS_MEDIAWIKI_TALK ,
-       'ٷلگٸ'        => NS_TEMPLATE ,
+       'مەدياۋيكي_تالقىلاۋى'  => NS_MEDIAWIKI_TALK,
+       'ٷلگٸ'        => NS_TEMPLATE,
        'ٷلگٸ_تالقىلاۋى'    => NS_TEMPLATE_TALK,
        'ٴۇلگٴى'              => NS_TEMPLATE,
        'ٴۇلگٴى_تالقىلاۋى'    => NS_TEMPLATE_TALK,
index 3e1b7ab..680c2ea 100644 (file)
@@ -77,8 +77,8 @@ $namespaceAliases = array(
 
        # Aliases to renamed kk-arab namespaces
        'مەدياۋيكي'        => NS_MEDIAWIKI,
-       'مەدياۋيكي_تالقىلاۋى'  => NS_MEDIAWIKI_TALK ,
-       'ٷلگٸ'        => NS_TEMPLATE ,
+       'مەدياۋيكي_تالقىلاۋى'  => NS_MEDIAWIKI_TALK,
+       'ٷلگٸ'        => NS_TEMPLATE,
        'ٷلگٸ_تالقىلاۋى'    => NS_TEMPLATE_TALK,
        'ٴۇلگٴى'              => NS_TEMPLATE,
        'ٴۇلگٴى_تالقىلاۋى'    => NS_TEMPLATE_TALK,
index 76aff5b..b7f8c6f 100644 (file)
@@ -72,8 +72,8 @@ $namespaceAliases = array(
 
        # Aliases to renamed kk-arab namespaces
        'مەدياۋيكي'        => NS_MEDIAWIKI,
-       'مەدياۋيكي_تالقىلاۋى'  => NS_MEDIAWIKI_TALK ,
-       'ٷلگٸ'        => NS_TEMPLATE ,
+       'مەدياۋيكي_تالقىلاۋى'  => NS_MEDIAWIKI_TALK,
+       'ٷلگٸ'        => NS_TEMPLATE,
        'ٷلگٸ_تالقىلاۋى'    => NS_TEMPLATE_TALK,
        'ٴۇلگٴى'              => NS_TEMPLATE,
        'ٴۇلگٴى_تالقىلاۋى'    => NS_TEMPLATE_TALK,
index 5eaccf6..3c65610 100644 (file)
@@ -180,5 +180,5 @@ $magicWords = array(
 );
 
 $linkTrail = '/^((?:[a-z]|а|æ|б|в|г|д|е|ё|ж|з|и|й|к|л|м|н|о|п|р|с|т|у|ф|х|ц|ч|ш|щ|ъ|ы|ь|э|ю|я|“|»)+)(.*)$/sDu';
-$fallback8bitEncoding =  'windows-1251';
+$fallback8bitEncoding = 'windows-1251';
 
index b359c26..0d64526 100644 (file)
@@ -304,7 +304,7 @@ $magicWords = array(
 );
 
 $linkTrail = '/^([a-zåäöéÅÄÖÉ]+)(.*)$/sDu';
-$separatorTransformTable =  array(
+$separatorTransformTable = array(
        ',' => "\xc2\xa0", // @bug 2749
        '.' => ','
 );
index 93fe660..98441b6 100644 (file)
@@ -79,7 +79,7 @@ class CompareParserCache extends Maintenance {
 
                                $this->output( "Found cache entry found for '{$title->getPrefixedText()}'..." );
                                $oldHtml = trim( preg_replace( '#<!-- .+-->#Us', '', $parserOutputOld->getText() ) );
-                               $newHtml = trim( preg_replace( '#<!-- .+-->#Us', '',$parserOutputNew->getText() ) );
+                               $newHtml = trim( preg_replace( '#<!-- .+-->#Us', '', $parserOutputNew->getText() ) );
                                $diff = wfDiff( $oldHtml, $newHtml );
                                if ( strlen( $diff ) ) {
                                        $this->output( "differences found:\n\n$diff\n\n" );
index 2bb5e6b..db6c315 100644 (file)
@@ -365,7 +365,7 @@ class UcdXmlReader {
                $xml = $this->open();
                $this->callback = $callback;
 
-               while ( $xml->name !== 'repertoire' && $xml->next() ) ;
+               while ( $xml->name !== 'repertoire' && $xml->next() );
 
                while ( $xml->read() ) {
                        if ( $xml->nodeType == XMLReader::ELEMENT ) {
@@ -389,7 +389,7 @@ class UcdXmlReader {
                if ( !$this->xml ) {
                        throw new MWException( __METHOD__ . ": unable to open {$this->fileName}" );
                }
-               while ( $this->xml->name !== 'ucd' && $this->xml->read() ) ;
+               while ( $this->xml->name !== 'ucd' && $this->xml->read() );
                $this->xml->read();
 
                return $this->xml;
@@ -450,7 +450,7 @@ class UcdXmlReader {
                }
 
                $xml = $this->open();
-               while ( $xml->name !== 'blocks' && $xml->read() ) ;
+               while ( $xml->name !== 'blocks' && $xml->read() );
 
                while ( $xml->read() ) {
                        if ( $xml->nodeType == XMLReader::ELEMENT ) {
index be176c7..a6cebc3 100644 (file)
@@ -44,7 +44,7 @@ function wfInstallerMain() {
 
        if ( !$installer->startSession() ) {
 
-               if( $installer->request->getVal( "css" ) ) {
+               if ( $installer->request->getVal( "css" ) ) {
                        // Do not display errors on css pages
                        $installer->outputCss();
                        exit;
index 7dc376a..bffc65d 100644 (file)
@@ -551,7 +551,7 @@ class VectorTemplate extends BaseTemplate {
 
                                                <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
                                                        <?php
-                                                       if ($wgVectorUseSimpleSearch) {
+                                                       if ( $wgVectorUseSimpleSearch ) {
                                                        ?>
                                                        <div id="simpleSearch">
                                                                <?php
index fac9b88..1ce28ff 100644 (file)
@@ -92,7 +92,7 @@ class WfTimestampTest extends MediaWikiTestCase {
                if ( substr( $output, 0, 1 ) === '/' ) {
                        // Bug 64946: Day of the week calculations for very old
                        // timestamps varies from system to system.
-                       $this->assertRegExp(  $output, $timestamp, $message );
+                       $this->assertRegExp( $output, $timestamp, $message );
                } else {
                        $this->assertEquals( $output, $timestamp, $message );
                }
index 8895403..70014bf 100644 (file)
@@ -26,7 +26,7 @@ class ImportTest extends MediaWikiLangTestCase {
        public function testHandlePageContainsRedirect( $xml, $redirectTitle ) {
                $source = $this->getInputStreamSource( $xml );
 
-               $redirect = NULL;
+               $redirect = null;
                $callback = function( $title, $origTitle, $revCount, $sRevCount, $pageInfo ) use ( &$redirect ) {
                        if ( array_key_exists( 'redirect', $pageInfo ) ) {
                                $redirect = $pageInfo['redirect'];
@@ -92,7 +92,7 @@ EOF
 </mediawiki>
 EOF
                        ,
-                               NULL
+                               null
                        ),
                );
        }
index a5dac8d..02f6b2a 100644 (file)
@@ -215,8 +215,8 @@ class LinksUpdateTest extends MediaWikiTestCase {
                $po->setProperty( "bool", true );
                $expected[] = array( "bool", true );
 
-               $po->setProperty( "float", 4.0 + 1.0/4.0 );
-               $expected[] = array( "float", 4.0 + 1.0/4.0 );
+               $po->setProperty( "float", 4.0 + 1.0 / 4.0 );
+               $expected[] = array( "float", 4.0 + 1.0 / 4.0 );
 
                $po->setProperty( "int", -7 );
                $expected[] = array( "int", -7 );
index 5fee505..77a5313 100644 (file)
@@ -179,7 +179,7 @@ mw.loader.implement("test.quux",function($,jQuery){mw.test.baz({token:123});},{"
         * @dataProvider provideMakeResourceLoaderLink
         * @covers OutputPage::makeResourceLoaderLink
         */
-       public function testMakeResourceLoaderLink( $args, $expectedHtml) {
+       public function testMakeResourceLoaderLink( $args, $expectedHtml ) {
                $this->setMwGlobals( array(
                        'wgResourceLoaderDebug' => false,
                        'wgResourceLoaderUseESI' => true,
@@ -199,19 +199,19 @@ mw.loader.implement("test.quux",function($,jQuery){mw.test.baz({token:123});},{"
                $out = new OutputPage( $ctx );
                $rl = $out->getResourceLoader();
                $rl->register( array(
-                       'test.foo' => new ResourceLoaderTestModule(array(
+                       'test.foo' => new ResourceLoaderTestModule( array(
                                'script' => 'mw.test.foo( { a: true } );',
                                'styles' => '.mw-test-foo { content: "style"; }',
                        )),
-                       'test.bar' => new ResourceLoaderTestModule(array(
+                       'test.bar' => new ResourceLoaderTestModule( array(
                                'script' => 'mw.test.bar( { a: true } );',
                                'styles' => '.mw-test-bar { content: "style"; }',
                        )),
-                       'test.baz' => new ResourceLoaderTestModule(array(
+                       'test.baz' => new ResourceLoaderTestModule( array(
                                'script' => 'mw.test.baz( { a: true } );',
                                'styles' => '.mw-test-baz { content: "style"; }',
                        )),
-                       'test.quux' => new ResourceLoaderTestModule(array(
+                       'test.quux' => new ResourceLoaderTestModule( array(
                                'script' => 'mw.test.baz( { token: 123 } );',
                                'styles' => '/* pref-animate=off */ .mw-icon { transition: none; }',
                                'group' => 'private',
index f0d4c4d..ae82bc4 100644 (file)
@@ -26,7 +26,7 @@ class TimeAdjustTest extends MediaWikiLangTestCase {
                return array(
                        array( '20061231235959', 0, '20061231235959' ),
                        array( '20061231235959', 5, '20070101000459' ),
-                       array( '20061231235959', 15,'20070101001459' ),
+                       array( '20061231235959', 15, '20070101001459' ),
                        array( '20061231235959', 60, '20070101005959' ),
                        array( '20061231235959', 90, '20070101012959' ),
                        array( '20061231235959', 120, '20070101015959' ),
index 839a0c5..4a927ed 100644 (file)
@@ -14,12 +14,12 @@ class ActionTest extends MediaWikiTestCase {
                parent::setUp();
 
                $this->setMwGlobals( 'wgActions', array(
-                       'null'     => null,
-                       'dummy'    => true,
-                       'string'   => 'NamedDummyAction',
+                       'null' => null,
+                       'dummy' => true,
+                       'string' => 'NamedDummyAction',
                        'declared' => 'NonExistingClassName',
                        'callable' => array( $this, 'dummyActionCallback' ),
-                       'object'   => new InstantiatedDummyAction( $this->getPage(), $this->getContext() ),
+                       'object' => new InstantiatedDummyAction( $this->getPage(), $this->getContext() ),
                ) );
        }
 
@@ -33,19 +33,19 @@ class ActionTest extends MediaWikiTestCase {
 
        public function actionProvider() {
                return array(
-                       array( 'dummy',    'DummyAction' ),
-                       array( 'string',   'NamedDummyAction' ),
+                       array( 'dummy', 'DummyAction' ),
+                       array( 'string', 'NamedDummyAction' ),
                        array( 'callable', 'CalledDummyAction' ),
-                       array( 'object',   'InstantiatedDummyAction' ),
+                       array( 'object', 'InstantiatedDummyAction' ),
 
                        // Capitalization is ignored
-                       array( 'STRING',   'NamedDummyAction' ),
+                       array( 'STRING', 'NamedDummyAction' ),
 
                        // Null and non-existing values
-                       array( 'null',       null ),
+                       array( 'null', null ),
                        array( 'undeclared', null ),
-                       array( '',           null ),
-                       array( null,         null ),
+                       array( '', null ),
+                       array( null, null ),
                );
        }
 
index 0a6bf72..11bce51 100644 (file)
@@ -8,7 +8,7 @@ class ConfigFactoryTest extends MediaWikiTestCase {
        public function testRegister() {
                $factory = new ConfigFactory();
                $factory->register( 'unittest', 'GlobalVarConfig::newInstance' );
-               $this->assertTrue( True ); // No exception thrown
+               $this->assertTrue( true ); // No exception thrown
                $this->setExpectedException( 'InvalidArgumentException' );
                $factory->register( 'invalid', 'Invalid callback' );
        }
@@ -39,7 +39,7 @@ class ConfigFactoryTest extends MediaWikiTestCase {
                $factory = new ConfigFactory();
                $factory->register( 'unittest', function() {
                        return true; // Not a Config object
-               });
+               } );
                $this->setExpectedException( 'UnexpectedValueException' );
                $factory->makeConfig( 'unittest' );
        }
index 88bf7d9..1db6fae 100644 (file)
@@ -440,12 +440,12 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
 
                $databaseCreation = $db->query( 'CREATE TABLE a ( a_1 )', __METHOD__ );
                $this->assertInstanceOf( 'ResultWrapper', $databaseCreation, "Failed to create table a" );
-               $res = $db->select( 'a' , '*');
-               $this->assertEquals( 0,  $db->numFields($res), "expects to get 0 fields for an empty table" );
+               $res = $db->select( 'a', '*' );
+               $this->assertEquals( 0, $db->numFields( $res ), "expects to get 0 fields for an empty table" );
                $insertion = $db->insert( 'a', array( 'a_1' => 10 ), __METHOD__ );
                $this->assertTrue( $insertion, "Insertion failed" );
-               $res = $db->select( 'a' , '*');
-               $this->assertEquals( 1,  $db->numFields($res), "wrong number of fields" );
+               $res = $db->select( 'a', '*' );
+               $this->assertEquals( 1, $db->numFields( $res ), "wrong number of fields" );
 
                $this->assertTrue( $db->close(), "closing database" );
        }
index e642177..17c6224 100644 (file)
@@ -107,7 +107,7 @@ class MWDebugTest extends MediaWikiTestCase {
                        'gitViewUrl', 'time', 'log', 'debugLog', 'queries', 'request', 'memory',
                        'memoryPeak', 'includes', 'profile', '_element' );
 
-               foreach( $expectedKeys as $expectedKey ) {
+               foreach ( $expectedKeys as $expectedKey ) {
                        $this->assertArrayHasKey( $expectedKey, $data['debuginfo'], "debuginfo has $expectedKey" );
                }
 
index 7b64dfd..1b8ecf2 100644 (file)
@@ -78,7 +78,7 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
                        // Autodetect by file extension for the lazy.
                        $magic = MimeMagic::singleton();
                        $parts = explode( $name, '.' );
-                       $type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1]  );
+                       $type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1] );
                }
                return new UnregisteredLocalFile( false, $this->repo,
                        "mwstore://localtesting/data/$name", $type );
index 29af2c2..cbf4803 100644 (file)
@@ -78,7 +78,7 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
                $wgParser->parse( '<recursivecallparser>baz</recursivecallparser>', $title, $po );
        }
 
-       public function helperParserFunc( $input, $args, $parser) {
+       public function helperParserFunc( $input, $args, $parser ) {
                $title = Title::newFromText( 'foo' );
                $po = new ParserOptions;
                $parser->parse( $input, $title, $po );
index 2d31d08..d9cd57e 100644 (file)
@@ -50,10 +50,9 @@ class PoolCounterTest extends MediaWikiTestCase {
                        ->disableOriginalConstructor()
                        ->getMockForAbstractClass();
 
-               $hashKeyIntoSlots = new ReflectionMethod($poolCounter, 'hashKeyIntoSlots' );
+               $hashKeyIntoSlots = new ReflectionMethod( $poolCounter, 'hashKeyIntoSlots' );
                $hashKeyIntoSlots->setAccessible( true );
 
-
                $keysWithTwoSlots = $keysWithFiveSlots = array();
                foreach ( range( 1, 100 ) as $i ) {
                        $keysWithTwoSlots[] = $hashKeyIntoSlots->invoke( $poolCounter, 'key ' . $i, 2 );
index d2a4132..bed9c9e 100755 (executable)
@@ -105,7 +105,7 @@ class PHPUnitMaintClass extends Maintenance {
                        # The below code injects a parameter just like if the user called
                        # Probably fix bug 29226
                        $key = array_search( '--colors', $_SERVER['argv'] );
-                       if( $key === false ) {
+                       if ( $key === false ) {
                                array_splice( $_SERVER['argv'], 1, 0, '--colors' );
                        }
                }
@@ -115,7 +115,7 @@ class PHPUnitMaintClass extends Maintenance {
                # PHPUnit uses stream_resolve_include_path() internally
                # See bug 32022
                $key = array_search( '--include-path', $_SERVER['argv'] );
-               if( $key === false ) {
+               if ( $key === false ) {
                        array_splice( $_SERVER['argv'], 1, 0,
                                __DIR__
                                . PATH_SEPARATOR