Fixed spacing
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 20 Mar 2014 18:59:20 +0000 (19:59 +0100)
committerSiebrand <siebrand@kitano.nl>
Thu, 20 Mar 2014 20:37:30 +0000 (20:37 +0000)
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat

Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f

47 files changed:
includes/MediaWikiVersionFetcher.php
includes/QueryPage.php
includes/Setup.php
includes/TimestampException.php
includes/TitleArrayFromResult.php
includes/User.php
includes/UserArray.php
includes/composer/ComposerVersionNormalizer.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysqli.php
includes/diff/DairikiDiff.php
includes/filebackend/SwiftFileBackend.php
includes/installer/MssqlInstaller.php
includes/objectcache/MemcachedClient.php
includes/parser/CoreParserFunctions.php
includes/profiler/ProfilerMwprof.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWatchlist.php
includes/upload/UploadBase.php
languages/classes/LanguageUz.php
languages/utils/CLDRPluralRuleEvaluator.php
maintenance/generateJsonI18n.php
skins/CologneBlue.php
skins/Vector.php
tests/parser/parserTest.inc
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/MWTimestampTest.php
tests/phpunit/includes/MediaWikiVersionFetcherTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/StatusTest.php
tests/phpunit/includes/TitleArrayFromResultTest.php
tests/phpunit/includes/UserArrayFromResultTest.php
tests/phpunit/includes/composer/ComposerVersionNormalizerTest.php
tests/phpunit/includes/diff/ArrayDiffFormatterTest.php
tests/phpunit/includes/diff/DiffOpTest.php
tests/phpunit/includes/exception/BadTitleErrorTest.php
tests/phpunit/includes/exception/ErrorPageErrorTest.php
tests/phpunit/includes/exception/MWExceptionTest.php
tests/phpunit/includes/exception/ReadOnlyErrorTest.php
tests/phpunit/includes/exception/ThrottledErrorTest.php
tests/phpunit/includes/site/SiteListTest.php
tests/phpunit/languages/LanguageRuTest.php
tests/phpunit/languages/SpecialPageAliasTest.php
tests/testHelpers.inc

index 1d59ec3..17cb8aa 100644 (file)
@@ -28,4 +28,4 @@ class MediaWikiVersionFetcher {
                return $matches[1];
        }
 
-}
\ No newline at end of file
+}
index b808408..69629e0 100644 (file)
@@ -552,7 +552,7 @@ abstract class QueryPage extends SpecialPage {
                        if ( $this->numRows > 0 ) {
                                $out->addHTML( $this->msg( 'showingresultsinrange' )->numParams(
                                        min( $this->numRows, $this->limit ), # do not show the one extra row, if exist
-                                       $this->offset + 1, (min( $this->numRows, $this->limit ) + $this->offset) )->parseAsBlock() );
+                                       $this->offset + 1, ( min( $this->numRows, $this->limit ) + $this->offset ) )->parseAsBlock() );
                                # Disable the "next" link when we reach the end
                                $paging = $this->getLanguage()->viewPrevNext( $this->getPageTitle( $par ), $this->offset,
                                        $this->limit, $this->linkParameters(), ( $this->numRows <= $this->limit ) );
index 777ca37..1a7f21e 100644 (file)
@@ -36,7 +36,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 
 $fname = 'Setup.php';
 wfProfileIn( $fname );
-wfProfileIn( $fname  . '-defaults' );
+wfProfileIn( $fname . '-defaults' );
 
 // Check to see if we are at the file scope
 if ( !isset( $wgVersion ) ) {
@@ -396,7 +396,7 @@ if ( $wgRC2UDPAddress ) {
        );
 }
 
-wfProfileOut( $fname  . '-defaults' );
+wfProfileOut( $fname . '-defaults' );
 
 // Disable MWDebug for command line mode, this prevents MWDebug from eating up
 // all the memory from logging SQL queries on maintenance scripts
index 18f58fd..4345a73 100644 (file)
@@ -3,4 +3,4 @@
 /**
  * @since 1.20
  */
-class TimestampException extends MWException {}
\ No newline at end of file
+class TimestampException extends MWException {}
index f900538..b4a553f 100644 (file)
@@ -83,4 +83,4 @@ class TitleArrayFromResult extends TitleArray implements Countable {
        function valid() {
                return $this->current !== false;
        }
-}
\ No newline at end of file
+}
index dd8717f..1ccb732 100644 (file)
@@ -1700,7 +1700,7 @@ class User {
                        // Already pinged?
                        if ( $count ) {
                                if ( $count >= $max ) {
-                                       wfDebugLog( 'ratelimit', $this->getName() . " tripped! $key at $count $summary");
+                                       wfDebugLog( 'ratelimit', $this->getName() . " tripped! $key at $count $summary" );
                                        $triggered = true;
                                } else {
                                        wfDebug( __METHOD__ . ": ok. $key at $count $summary\n" );
index 38f0d9d..51fb154 100644 (file)
@@ -63,4 +63,4 @@ abstract class UserArray implements Iterator {
        protected static function newFromResult_internal( $res ) {
                return new UserArrayFromResult( $res );
        }
-}
\ No newline at end of file
+}
index 727e142..a0d31cf 100644 (file)
@@ -63,5 +63,4 @@ class ComposerVersionNormalizer {
 
                return $version;
        }
-
-}
\ No newline at end of file
+}
index e304a34..50b7158 100644 (file)
@@ -471,7 +471,7 @@ class DatabaseMssql extends DatabaseBase {
                $this->mScrollableCursor = false;
                try {
                        parent::deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        $this->mScrollableCursor = true;
                        throw $e;
                }
@@ -482,7 +482,7 @@ class DatabaseMssql extends DatabaseBase {
                $this->mScrollableCursor = false;
                try {
                        parent::delete( $table, $conds, $fname );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        $this->mScrollableCursor = true;
                        throw $e;
                }
@@ -730,7 +730,7 @@ class DatabaseMssql extends DatabaseBase {
                                $insertOptions,
                                $selectOptions
                        );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        $this->mScrollableCursor = true;
                        throw $e;
                }
@@ -911,7 +911,7 @@ class DatabaseMssql extends DatabaseBase {
                        $first = $offset + 1;
                        $last = $offset + $limit;
                        $sub1 = 'sub_' . $this->mSubqueryId;
-                       $sub2 = 'sub_' . ($this->mSubqueryId + 1);
+                       $sub2 = 'sub_' . ( $this->mSubqueryId + 1 );
                        $this->mSubqueryId += 2;
                        if ( !$s1 ) {
                                // wat
index b371ae0..8c9b06c 100644 (file)
@@ -67,7 +67,7 @@ class DatabaseMysqli extends DatabaseMysqlBase {
                                $port = $hostAndPort[1];
                        }
                }
-               
+
                $connFlags = 0;
                if ( $this->mFlags & DBO_SSL ) {
                        $connFlags |= MYSQLI_CLIENT_SSL;
index 61edc1e..0e38d68 100644 (file)
@@ -66,10 +66,10 @@ abstract class DiffOp {
         * @return string|null
         */
        public function getClosing( $i = null ) {
-               if( $i === null ) {
+               if ( $i === null ) {
                        return $this->closing;
                }
-               if( array_key_exists( $i, $this->closing ) ) {
+               if ( array_key_exists( $i, $this->closing ) ) {
                        return $this->closing[$i];
                }
                return null;
@@ -424,7 +424,7 @@ class DiffEngine {
                        }
 
                        $x1 = $xoff + (int)( ( $numer + ( $xlim - $xoff ) * $chunk ) / $nchunks );
-                       for (; $x < $x1; $x++ ) {
+                       for ( ; $x < $x1; $x++ ) {
                                $line = $flip ? $this->yv[$x] : $this->xv[$x];
                                if ( empty( $ymatches[$line] ) ) {
                                        continue;
index 7050226..174f9f3 100644 (file)
@@ -1275,7 +1275,7 @@ class SwiftFileBackend extends FileBackendStore {
                                return null;
                        }
 
-                       wfProfileIn( __METHOD__. "-{$this->name}-miss" );
+                       wfProfileIn( __METHOD__ . "-{$this->name}-miss" );
                        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( array(
                                'method' => 'HEAD',
                                'url' => $this->storageUrl( $auth, $container ),
index 952b902..d6c84eb 100644 (file)
@@ -273,12 +273,12 @@ class MssqlInstaller extends DatabaseInstaller {
                // http://technet.microsoft.com/en-us/library/ms178569.aspx
                // The following array sets up which permissions imply whatever permissions we specify
                $implied = array(
-                       // schema           database   server
-                       'DELETE'  => array( 'DELETE',  'CONTROL SERVER' ),
+                       // schema           database  server
+                       'DELETE'  => array( 'DELETE', 'CONTROL SERVER' ),
                        'EXECUTE' => array( 'EXECUTE', 'CONTROL SERVER' ),
-                       'INSERT'  => array( 'INSERT',  'CONTROL SERVER' ),
-                       'SELECT'  => array( 'SELECT',  'CONTROL SERVER' ),
-                       'UPDATE'  => array( 'UPDATE',  'CONTROL SERVER' ),
+                       'INSERT'  => array( 'INSERT', 'CONTROL SERVER' ),
+                       'SELECT'  => array( 'SELECT', 'CONTROL SERVER' ),
+                       'UPDATE'  => array( 'UPDATE', 'CONTROL SERVER' ),
                );
 
                $grantOptions = array_flip( $this->webUserPrivs );
index 79c5187..d9ea54c 100644 (file)
@@ -729,7 +729,7 @@ class MWMemcached {
         * @access  private
         */
        function _connect_sock( &$sock, $host ) {
-               list( $ip, $port ) = preg_split('/:(?=\d)/' , $host );
+               list( $ip, $port ) = preg_split( '/:(?=\d)/', $host );
                $sock = false;
                $timeout = $this->_connect_timeout;
                $errno = $errstr = null;
index 67b1c66..ad6bc0f 100644 (file)
@@ -60,12 +60,12 @@ class CoreParserFunctions {
                        $parser->setFunctionHook( $func, array( __CLASS__, $func ), SFH_NO_HASH );
                }
 
-               $parser->setFunctionHook( 'namespace',  array( __CLASS__, 'mwnamespace' ), SFH_NO_HASH );
-               $parser->setFunctionHook( 'int',        array( __CLASS__, 'intFunction' ), SFH_NO_HASH );
-               $parser->setFunctionHook( 'special',    array( __CLASS__, 'special'     ) );
-               $parser->setFunctionHook( 'speciale',   array( __CLASS__, 'speciale'    ) );
-               $parser->setFunctionHook( 'tag',        array( __CLASS__, 'tagObj'      ), SFH_OBJECT_ARGS );
-               $parser->setFunctionHook( 'formatdate', array( __CLASS__, 'formatDate'  ) );
+               $parser->setFunctionHook( 'namespace', array( __CLASS__, 'mwnamespace' ), SFH_NO_HASH );
+               $parser->setFunctionHook( 'int', array( __CLASS__, 'intFunction' ), SFH_NO_HASH );
+               $parser->setFunctionHook( 'special', array( __CLASS__, 'special' ) );
+               $parser->setFunctionHook( 'speciale', array( __CLASS__, 'speciale' ) );
+               $parser->setFunctionHook( 'tag', array( __CLASS__, 'tagObj' ), SFH_OBJECT_ARGS );
+               $parser->setFunctionHook( 'formatdate', array( __CLASS__, 'formatDate' ) );
 
                if ( $wgAllowDisplayTitle ) {
                        $parser->setFunctionHook( 'displaytitle', array( __CLASS__, 'displaytitle' ), SFH_NO_HASH );
@@ -210,7 +210,7 @@ class CoreParserFunctions {
 
        static function localurle( $parser, $s = '', $arg = null ) {
                $temp = self::urlFunction( 'getLocalURL', $s, $arg );
-               if( !is_string( $temp ) ) {
+               if ( !is_string( $temp ) ) {
                        return $temp;
                } else {
                        return htmlspecialchars( $temp );
@@ -223,7 +223,7 @@ class CoreParserFunctions {
 
        static function fullurle( $parser, $s = '', $arg = null ) {
                $temp = self::urlFunction( 'getFullURL', $s, $arg );
-               if( !is_string( $temp ) ) {
+               if ( !is_string( $temp ) ) {
                        return $temp;
                } else {
                        return htmlspecialchars( $temp );
index 5ecfc21..e7ed6e3 100644 (file)
@@ -36,7 +36,7 @@ class ProfilerMwprof extends Profiler {
 
        // Message types
 
-       const TYPE_SINGLE  = 1;
+       const TYPE_SINGLE = 1;
        const TYPE_RUNNING = 2;
 
        /**
index 64fafd7..aed4c44 100644 (file)
@@ -218,7 +218,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                );
                // Ensure uniform query order
                ksort( $query );
-               return  wfAppendQuery( wfScript( 'load' ), $query );
+               return wfAppendQuery( wfScript( 'load' ), $query );
        }
 
        /**
index 47f5b1e..2bd14c7 100644 (file)
@@ -141,7 +141,7 @@ class SpecialChangePassword extends FormSpecialPage {
                                ? 'resetpass-submit-loggedin'
                                : 'resetpass_submit'
                );
-               $form->addButton( 'wpCancel',  $this->msg( 'resetpass-submit-cancel' )->text() );
+               $form->addButton( 'wpCancel', $this->msg( 'resetpass-submit-cancel' )->text() );
                $form->setHeaderText( $this->msg( 'resetpass_text' )->parseAsBlock() );
                if ( $this->mPreTextMessage instanceof Message ) {
                        $form->addPreText( $this->mPreTextMessage->parseAsBlock() );
index a6b3602..3ef8f8b 100644 (file)
@@ -156,7 +156,6 @@ class UserrightsPage extends SpecialPage {
                                $targetUser->clearInstanceCache(); // bug 38989
                        }
 
-
                        if ( $request->getVal( 'conflictcheck-originalgroups' ) !== implode( ',', $targetUser->getGroups() ) ) {
                                $out->addWikiMsg( 'userrights-conflict' );
                        } else {
index 870fa11..d509f21 100644 (file)
@@ -490,7 +490,7 @@ class SpecialVersion extends SpecialPage {
 
                $fhooks = $wgParser->getFunctionHooks();
                if ( count( $fhooks ) ) {
-                       $out = Html::rawElement( 'h2', array( 'class' => 'mw-headline' ) , Linker::makeExternalLink(
+                       $out = Html::rawElement( 'h2', array( 'class' => 'mw-headline' ), Linker::makeExternalLink(
                                '//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions',
                                $this->msg( 'version-parser-function-hooks' )->parse(),
                                false /* msg()->parse() already escapes */
@@ -625,7 +625,7 @@ class SpecialVersion extends SpecialPage {
                                );
                        } else {
                                $vcsVerString = Html::element( 'span',
-                                       array( 'class' => 'mw-version-ext-vcs-version'),
+                                       array( 'class' => 'mw-version-ext-vcs-version' ),
                                        "({$vcsVersion})"
                                );
                        }
@@ -633,7 +633,7 @@ class SpecialVersion extends SpecialPage {
 
                        if ( $vcsDate ) {
                                $vcsTimeString = Html::element( 'span',
-                                               array( 'class' => 'mw-version-ext-vcs-timestamp'),
+                                               array( 'class' => 'mw-version-ext-vcs-timestamp' ),
                                                $this->getLanguage()->timeanddate( $vcsDate )
                                        );
                                $versionString .= " {$vcsTimeString}";
index fbdaec4..4c3f17b 100644 (file)
@@ -246,7 +246,6 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        ), LIST_OR );
                }
 
-
                ChangeTags::modifyDisplayQuery(
                        $tables,
                        $fields,
index 6cce4ac..d4be08c 100644 (file)
@@ -1195,7 +1195,7 @@ abstract class UploadBase {
         */
        public static function checkSvgPICallback( $target, $data ) {
                // Don't allow external stylesheets (bug 57550)
-               if ( preg_match( '/xml-stylesheet/i', $target) ) {
+               if ( preg_match( '/xml-stylesheet/i', $target ) ) {
                        return true;
                }
                return false;
@@ -1280,7 +1280,6 @@ abstract class UploadBase {
                        return true;
                }
 
-
                foreach ( $attribs as $attrib => $value ) {
                        $stripped = $this->stripXmlNamespace( $attrib );
                        $value = strtolower( $value );
index 88d57de..985de68 100644 (file)
@@ -114,7 +114,7 @@ class UzConverter extends LanguageConverter {
        }
 
        function translate( $text, $toVariant ) {
-               if( $toVariant == 'uz-cyrl' ) {
+               if ( $toVariant == 'uz-cyrl' ) {
                        $text = str_replace( 'ye', 'е', $text );
                        $text = str_replace( 'Ye', 'Е', $text );
                        $text = str_replace( 'YE', 'Е', $text );
index edd97fd..e9b7e02 100644 (file)
@@ -72,8 +72,8 @@ class CLDRPluralRuleEvaluator {
        public static function evaluateCompiled( $number, array $rules ) {
                // Calculate the values of the operand symbols
                $number = strval( $number );
-               if ( !preg_match( '/^ -? ( ([0-9]+) (?: \. ([0-9]+) )? )$/x', $number,  $m ) ) {
-                       wfDebug( __METHOD__.': invalid number input, returning "other"' );
+               if ( !preg_match( '/^ -? ( ([0-9]+) (?: \. ([0-9]+) )? )$/x', $number, $m ) ) {
+                       wfDebug( __METHOD__ . ': invalid number input, returning "other"' );
                        return count( $rules );
                }
                if ( !isset( $m[3] ) ) {
index fd56361..3b2374d 100644 (file)
@@ -125,7 +125,7 @@ $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, &$
 
 PHP;
 
-               $jsondir = str_replace('\\', '/', $jsondir );
+               $jsondir = str_replace( '\\', '/', $jsondir );
                $shim = str_replace( '{{OUT}}', $jsondir, $shim );
                return $shim;
        }
index 9344feb..ad1090a 100644 (file)
@@ -111,7 +111,7 @@ class CologneBlueTemplate extends BaseTemplate {
                return $html;
        }
 
-       /**
+       /**
         * @param string $name
         */
        protected function renderAfterPortlet( $name ) {
index 2bab6ad..5b944eb 100644 (file)
@@ -275,7 +275,7 @@ class VectorTemplate extends BaseTemplate {
                                        $this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
                                        break;
                                case 'LANGUAGES':
-                                       if ( $this->data['language_urls']  !== false ) {
+                                       if ( $this->data['language_urls'] !== false ) {
                                                $this->renderPortal( 'lang', $this->data['language_urls'], 'otherlanguages' );
                                        }
                                        break;
index 595dd7d..f20d73a 100644 (file)
@@ -672,7 +672,7 @@ class ParserTest {
                                )
                        )
                )';
-               $regex = '/'.$defs.'\b
+               $regex = '/' . $defs . '\b
                        (?<k>[\w-]+)                            # Key
                        \b
                        (?:\s*
@@ -688,7 +688,7 @@ class ParserTest {
                                )
                        )?
                        /x';
-               $valueregex = '/'.$defs.'(?&value)/x';
+               $valueregex = '/' . $defs . '(?&value)/x';
 
                if ( preg_match_all( $regex, $instring, $matches, PREG_SET_ORDER ) ) {
                        foreach ( $matches as $bits ) {
index 277826c..3742a54 100644 (file)
@@ -353,7 +353,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                                }
                                        // NOTE; some things such as Closures are not serializable
                                        // in this case just set the value!
-                               catch( Exception $e ) {
+                               catch ( Exception $e ) {
                                        $this->mwGlobals[$globalKey] = $GLOBALS[$globalKey];
                                }
                        }
index 5b038a6..c82dc42 100644 (file)
@@ -31,10 +31,10 @@ class MWTimestampTest extends MediaWikiLangTestCase {
 
        public function provideValidTimestampDifferences() {
                return array(
-                       array( '1406833268','1406833269', '00 00 00 01' ),
-                       array( '1406833268','1406833329', '00 00 01 01' ),
-                       array( '1406833268','1406836929', '00 01 01 01' ),
-                       array( '1406833268','1406923329', '01 01 01 01' ),
+                       array( '1406833268', '1406833269', '00 00 00 01' ),
+                       array( '1406833268', '1406833329', '00 00 01 01' ),
+                       array( '1406833268', '1406836929', '00 01 01 01' ),
+                       array( '1406833268', '1406923329', '01 01 01 01' ),
                );
        }
 
index bbb83da..e548f81 100644 (file)
@@ -18,4 +18,4 @@ class MediaWikiVersionFetcherTest extends PHPUnit_Framework_TestCase {
                $this->assertInternalType( 'string', $versionFetcher->fetchVersion() );
        }
 
-}
\ No newline at end of file
+}
index 7c99352..930a7f6 100644 (file)
@@ -31,7 +31,7 @@ class MessageTest extends MediaWikiLangTestCase {
        public function testParams( $expected ) {
                $msg = new Message( 'imasomething' );
 
-               $returned = call_user_func_array( array( $msg, 'params' ),  array_slice( func_get_args(), 1 ) );
+               $returned = call_user_func_array( array( $msg, 'params' ), array_slice( func_get_args(), 1 ) );
 
                $this->assertSame( $msg, $returned );
                $this->assertEquals( $expected, $msg->getParams() );
index b0e6d20..9d42d1c 100644 (file)
@@ -541,7 +541,7 @@ class StatusTest extends MediaWikiLangTestCase {
         */
        public function testGetStatusArrayWithNonObjectMessages( $nonObjMsg ) {
                $status = new Status();
-               if( !array_key_exists( 1, $nonObjMsg ) ) {
+               if ( !array_key_exists( 1, $nonObjMsg ) ) {
                        $status->warning( $nonObjMsg[0] );
                } else {
                        $status->warning( $nonObjMsg[0], $nonObjMsg[1] );
index 534bd2c..832316e 100644 (file)
@@ -113,5 +113,4 @@ class TitleArrayFromResultTest extends MediaWikiTestCase {
        //@todo unit test for key()
        //@todo unit test for next()
        //@todo unit test for rewind()
-
-}
\ No newline at end of file
+}
index adc330d..8d095d6 100644 (file)
@@ -108,5 +108,4 @@ class UserArrayFromResultTest extends MediaWikiTestCase {
        //@todo unit test for key()
        //@todo unit test for next()
        //@todo unit test for rewind()
-
-}
\ No newline at end of file
+}
index 8de8be1..59b8d20 100644 (file)
@@ -152,5 +152,4 @@ class ComposerVersionNormalizerTest extends PHPUnit_Framework_TestCase {
                        array( 'alpha42' ),
                );
        }
-
-}
\ No newline at end of file
+}
index 50c5c57..351908b 100644 (file)
@@ -40,7 +40,7 @@ class ArrayDiffFormatterTest extends MediaWikiTestCase {
                $diffOp->expects( $this->any() )
                        ->method( 'getOrig' )
                        ->will( $this->returnValue( $orig ) );
-               if( $type === 'change' ) {
+               if ( $type === 'change' ) {
                        $diffOp->expects( $this->any() )
                                ->method( 'getClosing' )
                                ->with( $this->isType( 'integer' ) )
@@ -104,10 +104,10 @@ class ArrayDiffFormatterTest extends MediaWikiTestCase {
                );
 
                $testCases = array();
-               foreach( $emptyArrayTestCases as $testCase ) {
+               foreach ( $emptyArrayTestCases as $testCase ) {
                        $testCases[] = array( $testCase, array() );
                }
-               foreach( $otherTestCases as $testCase ) {
+               foreach ( $otherTestCases as $testCase ) {
                        $testCases[] = array( $testCase[0], $testCase[1] );
                }
                return $testCases;
index fe2c566..d89b89f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 //Load our FakeDiffOp
-require_once( __DIR__ . DIRECTORY_SEPARATOR . 'FakeDiffOp.php' );
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'FakeDiffOp.php';
 
 /**
  * @licence GNU GPL v2+
@@ -44,10 +44,10 @@ class DiffOpTest extends MediaWikiTestCase {
        public function testGetClosingWithParameter() {
                $obj = new FakeDiffOp();
                $obj->closing = array( 'foo', 'bar', 'baz' );
-               $this->assertEquals( 'foo' , $obj->getClosing( 0 ) );
-               $this->assertEquals( 'bar' , $obj->getClosing( 1 ) );
-               $this->assertEquals( 'baz' , $obj->getClosing( 2 ) );
-               $this->assertEquals( null , $obj->getClosing( 3 ) );
+               $this->assertEquals( 'foo', $obj->getClosing( 0 ) );
+               $this->assertEquals( 'bar', $obj->getClosing( 1 ) );
+               $this->assertEquals( 'baz', $obj->getClosing( 2 ) );
+               $this->assertEquals( null, $obj->getClosing( 3 ) );
        }
 
        /**
index 6f9804d..003efd2 100644 (file)
@@ -22,10 +22,9 @@ class BadTitleErrorTest extends MediaWikiTestCase {
        public function testExceptionSetsStatusCode() {
                global $wgOut;
                $wgOut = $this->getMockWgOut();
-               try{
+               try {
                        throw new BadTitleError();
-               }
-               catch( BadTitleError $e ) {
+               } catch ( BadTitleError $e ) {
                        $e->report();
                        $this->assertTrue( true );
                }
index 4cfcd83..13dcf33 100644 (file)
@@ -27,7 +27,7 @@ class ErrorPageErrorTest extends MediaWikiTestCase {
                $mockMessage->expects( $this->once() )
                        ->method( 'inLanguage' )
                        ->will( $this->returnValue( $mockMessage ) );
-               $mockMessage->expects(  $this->once() )
+               $mockMessage->expects( $this->once() )
                        ->method( 'useDatabase' )
                        ->will( $this->returnValue( $mockMessage ) );
                return $mockMessage;
index 2dc4850..24741a3 100644 (file)
@@ -112,11 +112,11 @@ class MWExceptionTest extends MediaWikiTestCase {
         */
        public static function mockHook() {
                $args = func_get_args();
-               if( !$args[0] instanceof MWException ) {
+               if ( !$args[0] instanceof MWException ) {
                        return '$caller not instance of MWException';
                }
                unset( $args[0] );
-               if( array_key_exists( 1, $args ) && $args[1] === null ) {
+               if ( array_key_exists( 1, $args ) && $args[1] === null ) {
                        return null;
                }
                return 'YAY.' . json_encode( $args );
index 352ec65..6f6aba4 100644 (file)
@@ -10,7 +10,7 @@ class ReadOnlyErrorTest extends MediaWikiTestCase {
                $e = new ReadOnlyError();
                $this->assertEquals( 'readonly', $e->title );
                $this->assertEquals( 'readonlytext', $e->msg );
-               $this->assertEquals( wfReadOnlyReason()?: array(), $e->params );
+               $this->assertEquals( wfReadOnlyReason() ?: array(), $e->params );
        }
 
 }
index ca67241..8995a0d 100644 (file)
@@ -23,10 +23,9 @@ class ThrottledErrorTest extends MediaWikiTestCase {
        public function testExceptionSetsStatusCode() {
                global $wgOut;
                $wgOut = $this->getMockWgOut();
-               try{
+               try {
                        throw new ThrottledError();
-               }
-               catch( ThrottledError $e ) {
+               } catch ( ThrottledError $e ) {
                        $e->report();
                        $this->assertTrue( true );
                }
index 61d0ace..534ed9c 100644 (file)
@@ -229,7 +229,7 @@ class SiteListTest extends MediaWikiTestCase {
                foreach ( $list as $site ) {
                        $this->assertTrue( $copy->hasInternalId( $site->getInternalId() ) );
 
-                       foreach( $site->getNavigationIds() as $navId ) {
+                       foreach ( $site->getNavigationIds() as $navId ) {
                                $this->assertTrue(
                                        $copy->hasNavigationId( $navId ),
                                        'unserialized data expects nav id ' . $navId . ' for site ' . $site->getGlobalId()
index e17c708..792cf72 100644 (file)
@@ -22,7 +22,7 @@ class LanguageRuTest extends LanguageClassesTestCase {
         * @covers Language::convertPlural
         */
        public function testExplicitPlural() {
-               $forms = array( 'one','many', 'other', '12=dozen' );
+               $forms = array( 'one', 'many', 'other', '12=dozen' );
                $this->assertEquals( 'dozen', $this->getLang()->convertPlural( 12, $forms ) );
                $forms = array( 'one', 'many', '100=hundred', 'other', '12=dozen' );
                $this->assertEquals( 'hundred', $this->getLang()->convertPlural( 100, $forms ) );
index 8865f68..f6d6bc9 100644 (file)
@@ -17,8 +17,8 @@ class SpecialPageAliasTest extends MediaWikiTestCase {
         * @dataProvider validSpecialPageAliasesProvider
         */
        public function testValidSpecialPageAliases( $code, $specialPageAliases ) {
-               foreach( $specialPageAliases as $specialPage => $aliases ) {
-                       foreach( $aliases as $alias ) {
+               foreach ( $specialPageAliases as $specialPage => $aliases ) {
+                       foreach ( $aliases as $alias ) {
                                $msg = "$specialPage alias '$alias' in $code is valid with no slashes";
                                $this->assertRegExp( '/^[^\/]*$/', $msg );
                        }
@@ -30,7 +30,7 @@ class SpecialPageAliasTest extends MediaWikiTestCase {
 
                $data = array();
 
-               foreach( $codes as $code ) {
+               foreach ( $codes as $code ) {
                        $specialPageAliases = $this->getSpecialPageAliases( $code );
 
                        if ( $specialPageAliases !== array() ) {
index 1d9cf30..bc67147 100644 (file)
@@ -481,7 +481,7 @@ class TestFileIterator implements Iterator {
                                        }
 
                                        if ( $input == false || $result == false ||
-                                                ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled )
+                                               ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled )
                                                || ( preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) && $result != 'html/php' && !$this->parserTest->runParsoid )
                                                || !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] ) )
                                        ) {