Fix spacing and break some lines
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 24 Aug 2013 15:06:25 +0000 (17:06 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 24 Aug 2013 15:06:25 +0000 (17:06 +0200)
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac

62 files changed:
includes/AutoLoader.php
includes/Autopromote.php
includes/CategoryPage.php
includes/ChangeTags.php
includes/ChangesFeed.php
includes/Cookie.php
includes/DefaultSettings.php
includes/EditPage.php
includes/GlobalFunctions.php
includes/HttpFunctions.php
includes/api/ApiQuerySiteinfo.php
includes/cache/MessageCache.php
includes/cache/SquidUpdate.php
includes/db/DatabaseMysqlBase.php
includes/db/DatabaseOracle.php
includes/filerepo/ForeignAPIRepo.php
includes/gallery/PackedImageGallery.php
includes/gallery/TraditionalImageGallery.php
includes/installer/Installer.php
includes/installer/OracleInstaller.php
includes/limit.sh
includes/media/MediaTransformOutput.php
includes/media/PNGMetadataExtractor.php
includes/media/SVG.php
includes/objectcache/MemcachedPeclBagOStuff.php
includes/parser/Parser.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/search/SearchUpdate.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialRandomInCategory.php
includes/specials/SpecialUserlogin.php
includes/upload/UploadFromChunks.php
languages/data/plurals.xml
maintenance/backupTextPass.inc
maintenance/checkUsernames.php
maintenance/eraseArchivedFile.php
maintenance/getConfiguration.php
maintenance/mergeMessageFileList.php
maintenance/mwdocgen.php
maintenance/runJobs.php
maintenance/tables.sql
skins/MonoBook.php
skins/cologneblue/screen.css
skins/common/config.js
skins/common/protect.js
tests/parser/parserTest.inc
tests/phpunit/MediaWikiPHPUnitCommand.php
tests/phpunit/MediaWikiPHPUnitTestListener.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/IPTest.php
tests/phpunit/includes/XmlTypeCheckTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/api/ApiTest.php
tests/phpunit/includes/api/ApiTestCase.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/installer/InstallDocFormatterTest.php
tests/phpunit/includes/parser/MediaWikiParserTest.php
tests/phpunit/phpunit.php

index 45ad168..2f92ab0 100644 (file)
@@ -1126,12 +1126,13 @@ class AutoLoader {
        static function autoload( $className ) {
                global $wgAutoloadClasses, $wgAutoloadLocalClasses;
 
-               // Workaround for PHP bug <https://bugs.php.net/bug.php?id=49143> (5.3.2. is broken, it's fixed in 5.3.6).
-               // Strip leading backslashes from class names. When namespaces are used, leading backslashes are used to indicate
-               // the top-level namespace, e.g. \foo\Bar. When used like this in the code, the leading backslash isn't passed to
-               // the auto-loader ($className would be 'foo\Bar'). However, if a class is accessed using a string instead of a
-               // class literal (e.g. $class = '\foo\Bar'; new $class()), then some versions of PHP do not strip the leading
-               // backlash in this case, causing autoloading to fail.
+               // Workaround for PHP bug <https://bugs.php.net/bug.php?id=49143> (5.3.2. is broken, it's
+               // fixed in 5.3.6). Strip leading backslashes from class names. When namespaces are used,
+               // leading backslashes are used to indicate the top-level namespace, e.g. \foo\Bar. When
+               // used like this in the code, the leading backslash isn't passed to the auto-loader
+               // ($className would be 'foo\Bar'). However, if a class is accessed using a string instead
+               // of a class literal (e.g. $class = '\foo\Bar'; new $class()), then some versions of PHP
+               // do not strip the leading backlash in this case, causing autoloading to fail.
                $className = ltrim( $className, '\\' );
 
                if ( isset( $wgAutoloadLocalClasses[$className] ) ) {
index ec9dcf5..170d7ab 100644 (file)
@@ -126,7 +126,8 @@ class Autopromote {
                                return false;
                        } elseif ( $cond[0] == '^' ) { // XOR (exactly one cond passes)
                                if ( count( $cond ) > 3 ) {
-                                       wfWarn( 'recCheckCondition() given XOR ("^") condition on three or more conditions. Check your $wgAutopromote and $wgAutopromoteOnce settings.' );
+                                       wfWarn( 'recCheckCondition() given XOR ("^") condition on three or more conditions.' .
+                                               ' Check your $wgAutopromote and $wgAutopromoteOnce settings.' );
                                }
                                return self::recCheckCondition( $cond[1], $user )
                                        xor self::recCheckCondition( $cond[2], $user );
index 43ab4db..ba71aa0 100644 (file)
@@ -106,7 +106,13 @@ class CategoryPage extends Article {
                unset( $reqArray["from"] );
                unset( $reqArray["to"] );
 
-               $viewer = new $this->mCategoryViewerClass( $this->getContext()->getTitle(), $this->getContext(), $from, $until, $reqArray );
+               $viewer = new $this->mCategoryViewerClass(
+                       $this->getContext()->getTitle(),
+                       $this->getContext(),
+                       $from,
+                       $until,
+                       $reqArray
+               );
                $this->getContext()->getOutput()->addHTML( $viewer->getHTML() );
        }
 }
index e94143a..97e80f2 100644 (file)
@@ -98,7 +98,8 @@ class ChangeTags {
                $tags = array_filter( $tags ); // Make sure we're submitting all tags...
 
                if ( !$rc_id && !$rev_id && !$log_id ) {
-                       throw new MWException( "At least one of: RCID, revision ID, and log ID MUST be specified when adding a tag to a change!" );
+                       throw new MWException( 'At least one of: RCID, revision ID, and log ID MUST be ' .
+                               'specified when adding a tag to a change!' );
                }
 
                $dbr = wfGetDB( DB_SLAVE );
index 1d89888..0736c50 100644 (file)
@@ -208,7 +208,8 @@ class ChangesFeed {
                                FeedUtils::formatDiff( $obj ),
                                $url,
                                $obj->rc_timestamp,
-                               ( $obj->rc_deleted & Revision::DELETED_USER ) ? wfMessage( 'rev-deleted-user' )->escaped() : $obj->rc_user_text,
+                               ( $obj->rc_deleted & Revision::DELETED_USER )
+                                       ? wfMessage( 'rev-deleted-user' )->escaped() : $obj->rc_user_text,
                                $talkpage
                        );
                        $feed->outItem( $item );
index 1b22c0e..ecf4667 100644 (file)
@@ -82,7 +82,8 @@ class Cookie {
         * http://publicsuffix.org/
         *
         * @todo fixme fails to detect 3-letter top-level domains
-        * @todo fixme fails to detect 2-letter top-level domains for single-domain use (probably not a big problem in practice, but there are test cases)
+        * @todo fixme fails to detect 2-letter top-level domains for single-domain use (probably
+        * not a big problem in practice, but there are test cases)
         *
         * @param string $domain the domain to validate
         * @param string $originDomain (optional) the domain the cookie originates from
index 8396805..c04402e 100644 (file)
@@ -2384,7 +2384,7 @@ $wgHTCPRouting = array();
 /**
  * @deprecated since 1.22, please use $wgHTCPRouting instead.
  *
- * Whenever this is set and $wgHTCPRouting evaluates to false, $wgHTCPRouting 
+ * Whenever this is set and $wgHTCPRouting evaluates to false, $wgHTCPRouting
  * will be set to this value.
  * This is merely for back compatibility.
  *
index 7c7bfe9..61742c2 100644 (file)
@@ -1526,7 +1526,7 @@ class EditPage {
                        // message with content equivalent to default (allow empty pages
                        // in this case to disable messages, see bug 50124)
                        $defaultMessageText = $this->mTitle->getDefaultMessageText();
-                       if( $this->mTitle->getNamespace() === NS_MEDIAWIKI && $defaultMessageText !== false ) {
+                       if ( $this->mTitle->getNamespace() === NS_MEDIAWIKI && $defaultMessageText !== false ) {
                                $defaultText = $defaultMessageText;
                        } else {
                                $defaultText = '';
index dd23538..0060d15 100644 (file)
@@ -3969,8 +3969,8 @@ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
 }
 
 /**
- * Determine whether the client at a given source IP is likely to be able to 
- * access the wiki via HTTPS. 
+ * Determine whether the client at a given source IP is likely to be able to
+ * access the wiki via HTTPS.
  *
  * @param string $ip The IPv4/6 address in the normal human-readable form
  * @return boolean
index 444857a..78c2ac7 100644 (file)
@@ -66,7 +66,7 @@ class Http {
                if ( !isset( $options['timeout'] ) ) {
                        $options['timeout'] = 'default';
                }
-               if( !isset( $options['connectTimeout'] ) ) {
+               if ( !isset( $options['connectTimeout'] ) ) {
                        $options['connectTimeout'] = 'default';
                }
 
index 7bb7e38..9abfc78 100644 (file)
@@ -691,7 +691,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                ' extensions            - Returns extensions installed on the wiki',
                                ' fileextensions        - Returns list of file extensions allowed to be uploaded',
                                ' rightsinfo            - Returns wiki rights (license) information if available',
-                               " languages             - Returns a list of languages MediaWiki supports".
+                               " languages             - Returns a list of languages MediaWiki supports" .
                                        "(optionally localised by using {$p}inlanguagecode)",
                                ' skins                 - Returns a list of all enabled skins',
                                ' extensiontags         - Returns a list of parser extension tags',
index fcefc06..6ab1012 100644 (file)
@@ -715,7 +715,7 @@ class MessageCache {
                }
 
                // Normalise title-case input (with some inlining)
-               $lckey = strtr( $key, ' ', '_');
+               $lckey = strtr( $key, ' ', '_' );
                if ( ord( $key ) < 128 ) {
                        $lckey[0] = strtolower( $lckey[0] );
                        $uckey = ucfirst( $lckey );
@@ -743,7 +743,7 @@ class MessageCache {
                }
 
                // Post-processing if the message exists
-               if( $message !== false ) {
+               if ( $message !== false ) {
                        // Fix whitespace
                        $message = str_replace(
                                array(
index ebac788..d060d4b 100644 (file)
@@ -209,11 +209,11 @@ class SquidUpdate {
                                continue;
                        }
 
-                       if( isset( $conf['host'] ) && isset( $conf['port'] ) ) {
+                       if ( isset( $conf['host'] ) && isset( $conf['port'] ) ) {
                                // Normalize single entries
                                $conf = array( $conf );
                        }
-                       foreach( $conf as $subconf ) {
+                       foreach ( $conf as $subconf ) {
                                if ( !isset( $subconf['host'] ) || !isset( $subconf['port'] ) ) {
                                        wfProfileOut( __METHOD__ );
                                        throw new MWException( "Invalid HTCP rule for URL $url\n" );
@@ -241,7 +241,7 @@ class SquidUpdate {
 
                        wfDebugLog( 'squid', __METHOD__ .
                                "Purging URL $url via HTCP\n" );
-                       foreach( $conf as $subconf ) {
+                       foreach ( $conf as $subconf ) {
                                socket_sendto( $conn, $htcpPacket, $htcpLen, 0,
                                        $subconf['host'], $subconf['port'] );
                        }
index cae133b..5614ed2 100644 (file)
@@ -73,7 +73,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                $this->installErrorHandler();
                try {
                        $this->mConn = $this->mysqlConnect( $realServer );
-               } catch (Exception $ex) {
+               } catch ( Exception $ex ) {
                        wfProfileOut( "dbconnect-$server" );
                        wfProfileOut( __METHOD__ );
                        throw $ex;
index 2ccc056..fca979b 100644 (file)
@@ -286,7 +286,7 @@ class DatabaseOracle extends DatabaseBase {
                wfSuppressWarnings();
                if ( $this->mFlags & DBO_PERSISTENT ) {
                        $this->mConn = oci_pconnect( $this->mUser, $this->mPassword, $this->mServer, $this->defaultCharset, $session_mode );
-               } else if ( $this->mFlags & DBO_DEFAULT ) {
+               } elseif ( $this->mFlags & DBO_DEFAULT ) {
                        $this->mConn = oci_new_connect( $this->mUser, $this->mPassword, $this->mServer, $this->defaultCharset, $session_mode );
                } else {
                        $this->mConn = oci_connect( $this->mUser, $this->mPassword, $this->mServer, $this->defaultCharset, $session_mode );
index 6b0bc3a..128412c 100644 (file)
@@ -265,7 +265,7 @@ class ForeignAPIRepo extends FileRepo {
                ) );
                $info = $this->getImageInfo( $data );
 
-               if( $data && $info && isset( $info['thumberror'] ) ) {
+               if ( $data && $info && isset( $info['thumberror'] ) ) {
                        wfDebug( __METHOD__ . " got remote thumb error " . $info['thumberror'] . "\n" );
                        return new MediaTransformError(
                                'thumbnail_error_remote',
index 9149f8c..0095d34 100644 (file)
@@ -30,7 +30,7 @@ class PackedImageGallery extends TraditionalImageGallery {
        const SCALE_FACTOR = 1.5;
 
        protected function getVPad( $boxHeight, $thumbHeight ) {
-               return ( $this->getThumbPadding() + $boxHeight - $thumbHeight/ self::SCALE_FACTOR ) / 2;
+               return ( $this->getThumbPadding() + $boxHeight - $thumbHeight / self::SCALE_FACTOR ) / 2;
        }
 
        protected function getThumbPadding() {
index 223fb07..1f60fa6 100644 (file)
@@ -168,7 +168,7 @@ class TraditionalImageGallery extends ImageGalleryBase {
                                '';
 
 
-                       $galleryText  = $textlink . $text . $fileSize;
+                       $galleryText = $textlink . $text . $fileSize;
                        $galleryText = $this->wrapGalleryText( $galleryText, $thumb );
 
                        # Weird double wrapping (the extra div inside the li) needed due to FF2 bug
index d41f7b8..04d2b20 100644 (file)
@@ -1090,7 +1090,7 @@ abstract class Installer {
         */
        protected function envCheckSuhosinMaxValueLength() {
                $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
-               if ( $maxValueLength > 0 &&  $maxValueLength < 1024 ) {
+               if ( $maxValueLength > 0 && $maxValueLength < 1024 ) {
                        // Only warn if the value is below the sane 1024
                        $this->showMessage( 'config-suhosin-max-value-length', $maxValueLength );
                }
index e34bed3..aa95093 100644 (file)
@@ -311,7 +311,7 @@ class OracleInstaller extends DatabaseInstaller {
         * @return bool Whether the connection string is valid.
         */
        public static function checkConnectStringFormat( $connect_string ) {
-               $isValid  = preg_match( '/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string ); // TNS name
+               $isValid = preg_match( '/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string ); // TNS name
                $isValid |= preg_match( '/^(?:\/\/)?[\w\-\.]+(?::[\d]+)?(?:\/(?:[\w\-\.]+(?::(pooled|dedicated|shared))?)?(?:\/[\w\-\.]+)?)?$/', $connect_string ); // EZConnect
                return (bool)$isValid;
        }
index bc1988d..6c4690e 100644 (file)
@@ -55,7 +55,7 @@ fi
 
 # Clean up cgroup
 cleanup() {
-       # First we have to move the current task into a "garbage" group, otherwise 
+       # First we have to move the current task into a "garbage" group, otherwise
        # the cgroup will not be empty, and attempting to remove it will fail with
        # "Device or resource busy"
        if [ -w "$MW_CGROUP"/tasks ]; then
@@ -84,7 +84,7 @@ if [ -n "$MW_CGROUP" ]; then
        updateTaskCount
 
        if [ $NUM_TASKS -gt 1 ]; then
-               # Spawn a monitor process which will continue to poll for completion 
+               # Spawn a monitor process which will continue to poll for completion
                # of all processes in the cgroup after termination of the parent shell
                (
                        while [ $NUM_TASKS -gt 1 ]; do
index fde38bb..c49d3f2 100644 (file)
@@ -209,7 +209,7 @@ abstract class MediaTransformOutput {
                if ( $this->page && $this->page !== 1 ) {
                        $query['page'] = $this->page;
                }
-               if( $this->lang ) {
+               if ( $this->lang ) {
                        $query['lang'] = $this->lang;
                }
 
index 34e5fa7..845d212 100644 (file)
@@ -202,7 +202,7 @@ class PNGMetadataExtractor {
 
                                                        if ( $items[5] === false ) {
                                                                // decompression failed
-                                                               wfDebug( __METHOD__ . ' Error decompressing iTxt chunk - ' . $items[1] . "\n");
+                                                               wfDebug( __METHOD__ . ' Error decompressing iTxt chunk - ' . $items[1] . "\n" );
                                                                fseek( $fh, self::$CRC_size, SEEK_CUR );
                                                                continue;
                                                        }
@@ -290,7 +290,7 @@ class PNGMetadataExtractor {
 
                                        if ( $content === false ) {
                                                // decompression failed
-                                               wfDebug( __METHOD__ . ' Error decompressing zTXt chunk - ' . $keyword . "\n");
+                                               wfDebug( __METHOD__ . ' Error decompressing zTXt chunk - ' . $keyword . "\n" );
                                                fseek( $fh, self::$CRC_size, SEEK_CUR );
                                                continue;
                                        }
index f0356f5..28083a7 100644 (file)
@@ -180,7 +180,7 @@ class SvgHandler extends ImageHandler {
                                ) . " 2>&1";
 
                                $env = array();
-                               if( $lang !== false ) {
+                               if ( $lang !== false ) {
                                        $env['LANG'] = $lang;
                                }
 
@@ -376,9 +376,9 @@ class SvgHandler extends ImageHandler {
                if ( in_array( $name, array( 'width', 'height' ) ) ) {
                        // Reject negative heights, widths
                        return ( $value > 0 );
-               } elseif( $name == 'lang' ) {
+               } elseif ( $name == 'lang' ) {
                        // Validate $code
-                       if( !Language::isValidBuiltinCode( $value ) ) {
+                       if ( !Language::isValidBuiltinCode( $value ) ) {
                                wfDebug( "Invalid user language code\n" );
                                return false;
                        }
@@ -394,7 +394,7 @@ class SvgHandler extends ImageHandler {
         */
        function makeParamString( $params ) {
                $lang = '';
-               if( isset( $params['lang'] ) && $params['lang'] !== 'en' ) {
+               if ( isset( $params['lang'] ) && $params['lang'] !== 'en' ) {
                        $params['lang'] = mb_strtolower( $params['lang'] );
                        $lang = "lang{$params['lang']}-";
                }
@@ -408,7 +408,7 @@ class SvgHandler extends ImageHandler {
                $m = false;
                if ( preg_match( '/^lang([a-z]+(?:-[a-z]+)*)-(\d+)px$/', $str, $m ) ) {
                        return array( 'width' => array_pop( $m ), 'lang' => $m[1] );
-               } elseif( preg_match( '/^(\d+)px$/', $str, $m ) ) {
+               } elseif ( preg_match( '/^(\d+)px$/', $str, $m ) ) {
                        return array( 'width' => $m[1], 'lang' => 'en' );
                } else {
                        return false;
index f962162..0c3b228 100644 (file)
@@ -67,7 +67,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                        $this->client->setOption( Memcached::OPT_RETRY_TIMEOUT, $params['retry_timeout'] );
                }
 
-               if ( isset ( $params['server_failure_limit'] ) ) {
+               if ( isset( $params['server_failure_limit'] ) ) {
                        $this->client->setOption( Memcached::OPT_SERVER_FAILURE_LIMIT, $params['server_failure_limit'] );
                }
 
index a6823bf..1ab29eb 100644 (file)
@@ -1423,7 +1423,7 @@ class Parser {
                // of bold and italics mark-ups.
                $numbold = 0;
                $numitalics = 0;
-               for ( $i = 1; $i < count( $arr ); $i+=2 ) {
+               for ( $i = 1; $i < count( $arr ); $i += 2 ) {
                        // If there are ever four apostrophes, assume the first is supposed to
                        // be text, and the remaining three constitute mark-up for bold text.
                        // (bug 13227: ''''foo'''' turns into ' ''' foo ' ''')
@@ -1456,7 +1456,7 @@ class Parser {
                        $firstsingleletterword = -1;
                        $firstmultiletterword = -1;
                        $firstspace = -1;
-                       for ( $i = 1; $i < count( $arr ); $i+=2 ) {
+                       for ( $i = 1; $i < count( $arr ); $i += 2 ) {
                                if ( strlen( $arr[$i] ) == 3 ) {
                                        $x1 = substr( $arr[$i - 1], -1 );
                                        $x2 = substr( $arr[$i - 1], -2, 1 );
@@ -5159,7 +5159,7 @@ class Parser {
                                        if ( $magicName ) {
                                                $paramName = $paramMap[$magicName];
 
-                                               switch( $paramName ) {
+                                               switch ( $paramName ) {
                                                case 'gallery-internal-alt':
                                                        $alt = $this->stripAltText( $match, false );
                                                        break;
index 48318b3..dde0609 100644 (file)
@@ -415,10 +415,10 @@ class Preprocessor_DOM implements Preprocessor {
                                                        foreach ( $comments as $j => $com ) {
                                                                $startPos = $com[0];
                                                                $endPos = $com[1] + 1;
-                                                               if ( $j == ( count( $comments ) - 1) ) {
+                                                               if ( $j == ( count( $comments ) - 1 ) ) {
                                                                        break;
                                                                }
-                                                               $inner = substr( $text, $startPos, $endPos - $startPos);
+                                                               $inner = substr( $text, $startPos, $endPos - $startPos );
                                                                $accum .= '<comment>' . htmlspecialchars( $inner ) . '</comment>';
                                                        }
 
index 3f5ca8e..2fc5e11 100644 (file)
@@ -342,10 +342,10 @@ class Preprocessor_Hash implements Preprocessor {
                                                        foreach ( $comments as $j => $com ) {
                                                                $startPos = $com[0];
                                                                $endPos = $com[1] + 1;
-                                                               if ( $j == ( count( $comments ) - 1) ) {
+                                                               if ( $j == ( count( $comments ) - 1 ) ) {
                                                                        break;
                                                                }
-                                                               $inner = substr( $text, $startPos, $endPos - $startPos);
+                                                               $inner = substr( $text, $startPos, $endPos - $startPos );
                                                                $accum->addNodeWithText( 'comment', $inner );
                                                        }
 
index 22e4724..2148210 100644 (file)
@@ -66,7 +66,7 @@ class SearchUpdate implements DeferrableUpdate {
                if ( $nt ) {
                        $this->id = $id;
                        // is_string() check is back-compat for ApprovedRevs
-                       if( is_string( $c ) ) {
+                       if ( is_string( $c ) ) {
                                $this->content = new TextContent( $c );
                        } else {
                                $this->content = $c ?: false;
index 1dc4244..253e6cc 100644 (file)
@@ -646,7 +646,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        $newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
                        if ( !$newSubpage ) {
                                $oldLink = Linker::linkKnown( $oldSubpage );
-                               $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink     )
+                               $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink )
                                        ->params( Title::makeName( $newNs, $newPageName ) )->escaped();
                                continue;
                        }
index 2e4bf20..368c467 100644 (file)
@@ -215,7 +215,7 @@ class SpecialRandomInCategory extends SpecialPage {
                if ( !$this->minTimestamp || !$this->maxTimestamp ) {
                        try {
                                list( $this->minTimestamp, $this->maxTimestamp ) = $this->getMinAndMaxForCat( $this->category );
-                       } catch( MWException $e ) {
+                       } catch ( MWException $e ) {
                                // Possibly no entries in category.
                                return false;
                        }
index 9975741..d4784a5 100644 (file)
@@ -1125,11 +1125,11 @@ class LoginForm extends SpecialPage {
                }
 
                // Decide if we default stickHTTPS on
-               if ( $wgSecureLoginDefaultHTTPS 
-                       && $this->mAction != 'submitlogin' 
+               if ( $wgSecureLoginDefaultHTTPS
+                       && $this->mAction != 'submitlogin'
                        && !$this->mLoginattempt
                        && wfCanIPUseHTTPS( $this->getRequest()->getIP() ) )
-               {       
+               {
                        $this->mStickHTTPS = true;
                }
 
index 1746206..2e0b944 100644 (file)
@@ -346,7 +346,7 @@ class UploadFromChunks extends UploadFromFile {
                $res = $this->verifyPartialFile();
                $this->mDesiredDestName = $oldDesiredDestName;
                $this->mTitle = false;
-               if( is_array( $res ) ) {
+               if ( is_array( $res ) ) {
                        throw new UploadChunkVerificationException( $res[0] );
                }
        }
index d1a403d..d5a1cfe 100644 (file)
@@ -5,7 +5,7 @@
     <generation date="$Date: 2013-01-03 07:17:41 +0530 (Thu, 03 Jan 2013) $"/>
     <plurals>
         <!-- if locale is known to have no plurals, there are no rules -->
-        <pluralRules locales="az bm bo dz fa id ig ii hu ja jv ka kde kea km kn ko lo ms my sah ses sg th to tr vi wo yo zh"/> 
+        <pluralRules locales="az bm bo dz fa id ig ii hu ja jv ka kde kea km kn ko lo ms my sah ses sg th to tr vi wo yo zh"/>
         <pluralRules locales="ar">
             <pluralRule count="zero">n is 0</pluralRule>
             <pluralRule count="one">n is 1</pluralRule>
index 7aac4d4..c515c6f 100644 (file)
@@ -484,7 +484,12 @@ class TextPassDumper extends BackupDumper {
 
                                $revLength = strlen( $text );
                                if ( $wgContentHandlerUseDB ) {
-                                       $row  = $this->db->selectRow( 'revision', array( 'rev_len', 'rev_content_model' ), array( 'rev_id' => $revID ), __METHOD__ );
+                                       $row = $this->db->selectRow(
+                                               'revision',
+                                               array( 'rev_len', 'rev_content_model' ),
+                                               array( 'rev_id' => $revID ),
+                                               __METHOD__
+                                       );
                                        if ( $row ) {
                                                // only check the length for the wikitext content handler,
                                                // it's a wasted (and failed) check otherwise
index 7deca80..6df189f 100644 (file)
@@ -61,7 +61,7 @@ class CheckUsernames extends Maintenance {
                                }
                        }
                        $maxUserId = $row->user_id;
-               } while( $res->numRows() );
+               } while ( $res->numRows() );
        }
 }
 
index 4b06513..1c3f037 100644 (file)
@@ -22,7 +22,7 @@
  * @author Aaron Schulz
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script to delete archived (non-current) files from storage.
@@ -116,4 +116,4 @@ class EraseArchivedFile extends Maintenance {
 }
 
 $maintClass = "EraseArchivedFile";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;
index d9ed956..5a5eb58 100644 (file)
@@ -63,19 +63,19 @@ class GetConfiguration extends Maintenance {
                $format = strtolower( $this->getOption( 'format', 'PHP' ) );
 
                $validFormat = in_array( $format, self::$outFormats );
-               if( ! $validFormat ) {
-                       $this->error("--format set to an unrecognized format", 0);
+               if ( ! $validFormat ) {
+                       $this->error( "--format set to an unrecognized format", 0 );
                        $error_out = true;
                }
 
-               if( $this->getOption( 'regex' ) && $this->getOption( 'iregex' ) ) {
-                       $this->error("Can only use either --regex or --iregex");
+               if ( $this->getOption( 'regex' ) && $this->getOption( 'iregex' ) ) {
+                       $this->error( "Can only use either --regex or --iregex" );
                        $error_out = true;
                }
 
                parent::validateParamsAndArgs();
 
-               if( $error_out ) {
+               if ( $error_out ) {
                        # Force help and quit
                        $this->maybeHelp( true );
                }
@@ -88,14 +88,14 @@ class GetConfiguration extends Maintenance {
                parent::finalSetup();
 
                $this->regex = $this->getOption( 'regex' ) ? : $this->getOption( 'iregex' );
-               if( $this->regex ) {
+               if ( $this->regex ) {
                        $this->regex = '/' . $this->regex . '/';
                        if ( $this->hasOption( 'iregex' ) ) {
                                $this->regex .= 'i';  # case insensitive regex
                        }
                }
 
-               if( $this->hasOption( 'settings' ) ) {
+               if ( $this->hasOption( 'settings' ) ) {
                        $this->settings_list = explode( ' ', $this->getOption( 'settings' ) );
                        # Values validation
                        foreach ( $this->settings_list as $name ) {
@@ -115,14 +115,14 @@ class GetConfiguration extends Maintenance {
                $res = array();
 
                # Sane default: dump any wg / wmg variable
-               if( ! $this->regex && ! $this->getOption( 'settings' ) ) {
+               if ( ! $this->regex && ! $this->getOption( 'settings' ) ) {
                        $this->regex = '/^wm?g/';
                }
 
                # Filter out globals based on the regex
                if ( $this->regex ) {
                        $res = array();
-                       foreach( $GLOBALS as $name => $value ) {
+                       foreach ( $GLOBALS as $name => $value ) {
                                if ( preg_match( $this->regex, $name ) ) {
                                        $res[$name] = $value;
                                }
@@ -131,7 +131,7 @@ class GetConfiguration extends Maintenance {
 
                # Explicitly dumps a list of provided global names
                if ( $this->settings_list ) {
-                       foreach( $this->settings_list as $name ) {
+                       foreach ( $this->settings_list as $name ) {
                                $res[$name] = $GLOBALS[$name];
                        }
                }
@@ -157,7 +157,7 @@ class GetConfiguration extends Maintenance {
                        throw new MWException( "Failed to serialize the requested settings." );
                }
 
-               if( $out ) {
+               if ( $out ) {
                        $this->output( $out . "\n" );
                }
        }
index b36a319..75b7ef0 100644 (file)
@@ -58,7 +58,7 @@ class MergeMessageFileList extends Maintenance {
 
                # Strip comments, discard empty lines, and trim leading and trailing
                # whitespace. Comments start with '#' and extend to the end of the line.
-               foreach( $lines as $line ) {
+               foreach ( $lines as $line ) {
                        $line = trim( preg_replace( '/#.*/', '', $line ) );
                        if ( $line !== '' ) {
                                $mmfl['setupFiles'][] = $line;
index 9fb1314..b22dd88 100644 (file)
@@ -79,7 +79,7 @@ class MWDocGen extends Maintenance {
 
                $this->input = '';
                $inputs = explode( ',', $this->getOption( 'file', '' ) );
-               foreach( $inputs as $input ) {
+               foreach ( $inputs as $input ) {
                        # Doxygen inputs are space separted and double quoted
                        $this->input .= " \"$IP/$input\"";
                }
index 52f0462..429edf4 100644 (file)
@@ -155,14 +155,14 @@ class RunJobs extends Maintenance {
                        $m = array();
                        if ( preg_match( '!^(\d+)(k|m|g|)$!i', ini_get( 'memory_limit' ), $m ) ) {
                                list( , $num, $unit ) = $m;
-                               $conv = array( 'g' => 1024*1024*1024, 'm' => 1024*1024, 'k' => 1024, '' => 1 );
+                               $conv = array( 'g' => 1024 * 1024 * 1024, 'm' => 1024 * 1024, 'k' => 1024, '' => 1 );
                                $maxBytes = $num * $conv[strtolower( $unit )];
                        } else {
                                $maxBytes = 0;
                        }
                }
                $usedBytes = memory_get_usage();
-               if ( $maxBytes && $usedBytes >= .95*$maxBytes ) {
+               if ( $maxBytes && $usedBytes >= 0.95 * $maxBytes ) {
                        throw new MWException( "Detected excessive memory usage ($usedBytes/$maxBytes)." );
                }
        }
index 7fc6bb8..df1bc06 100644 (file)
@@ -761,7 +761,7 @@ CREATE TABLE /*_*/ipblocks (
   -- Start and end of an address range, in hexadecimal
   -- Size chosen to allow IPv6
   -- FIXME: these fields were originally blank for single-IP blocks,
-  -- but now they are populated. No migration was ever done. They 
+  -- but now they are populated. No migration was ever done. They
   -- should be fixed to be blank again for such blocks (bug 49504).
   ipb_range_start tinyblob NOT NULL,
   ipb_range_end tinyblob NOT NULL,
index f905587..6d66cac 100644 (file)
@@ -90,7 +90,7 @@ class MonoBookTemplate extends BaseTemplate {
 <?php } ?><?php if ( $this->data['newtalk'] ) { ?>
                <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
 <?php } ?>
-               <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+               <div id="jump-to-nav" class="mw-jump"><?php $this->msg( 'jumpto' ) ?> <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
 
                <!-- start content -->
 <?php $this->html( 'bodytext' ) ?>
index c6c9063..bc5dd31 100644 (file)
@@ -201,8 +201,8 @@ input.mw-searchInput {
 
 
 #sitetitle, #sitesub, #toplinks, #linkcollection {
-       margin-top: 0; 
-       margin-bottom: 0; 
+       margin-top: 0;
+       margin-bottom: 0;
 }
 
 #sitetitle, #toplinks {
@@ -220,7 +220,7 @@ input.mw-searchInput {
 }
 #sitetitle a, #toplinks a {
        color: white;
-       text-decoration: none; 
+       text-decoration: none;
 }
 /* Bring #sitetitle to top. Otherwise #toplinks is overlaid over it, making the link unclickable. */
 #sitetitle a {
index 73a6dba..540eaf9 100644 (file)
@@ -25,7 +25,7 @@
                                                                .find( '.mw-help-field-data' )
                                                                        .slideToggle( 'fast' );
                                        } );
-               
+
                // Show/hide code for DB-specific options
                // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here?
                $( '.dbRadio' ).each( function () {
                                $wrapper.show( 'slow' );
                        }
                } );
-               
+
                // Scroll to the bottom of upgrade log
                $( '#config-live-log' ).children( 'textarea' ).each( function () {
                        this.scrollTop = this.scrollHeight;
                } );
-               
+
                // Show/hide Creative Commons thingy
                $( '.licenseRadio' ).click( function () {
                        var $wrapper = $( '#config-cc-wrapper' );
@@ -55,7 +55,7 @@
                                $wrapper.hide( 'slow' );
                        }
                } );
-               
+
                // Show/hide random stuff (email, upload)
                $( '.showHideRadio' ).click( function () {
                        var $wrapper = $( '#' + $(this).attr( 'rel' ) );
@@ -88,7 +88,7 @@
                                $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' );
                        }
                } );
-               
+
                // Synchronize radio button label for sitename with textbox
                $label = $( 'label[for=config__NamespaceType_site-name]' );
                labelText = $label.text();
index a23c0cb..8df4894 100644 (file)
@@ -19,7 +19,7 @@ window.ProtectionForm = {
                var box = document.getElementById( opts.tableId );
                if( !box )
                        return false;
-               
+
                var boxbody = box.getElementsByTagName('tbody')[0];
                var row = document.createElement( 'tr' );
                boxbody.insertBefore( row, boxbody.firstChild.nextSibling );
@@ -45,7 +45,7 @@ window.ProtectionForm = {
                        check.checked = !this.areAllTypesMatching();
                        this.enableUnchainedInputs( check.checked );
                }
-               
+
                $( '#mwProtect-reason' ).byteLimit( 180 );
 
                this.updateCascadeCheckbox();
index e7c36db..366aebb 100644 (file)
@@ -260,7 +260,7 @@ class ParserTest {
                                        'iw_wikiid' => '',
                                        'iw_local' => 1 ),
                        );
-                       if( array_key_exists( $prefix, $testInterwikis ) ) {
+                       if ( array_key_exists( $prefix, $testInterwikis ) ) {
                                $iwData = $testInterwikis[$prefix];
                        }
 
index 387107b..042956a 100644 (file)
@@ -21,15 +21,15 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
                }
        }
 
-       protected function handleArguments(array $argv) {
+       protected function handleArguments( array $argv ) {
                parent::handleArguments( $argv );
 
                if ( !isset( $this->arguments['listeners'] ) ) {
                        $this->arguments['listeners'] = array();
                }
 
-               foreach ($this->options[0] as $option) {
-                       switch ($option[0]) {
+               foreach ( $this->options[0] as $option ) {
+                       switch ( $option[0] ) {
                                case '--debug-tests':
                                        $this->arguments['listeners'][] = new MediaWikiPHPUnitTestListener( 'PHPUnitCommand' );
                                        break;
index 18e3fb7..7237ef3 100644 (file)
@@ -111,4 +111,4 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener {
        public function endTest( PHPUnit_Framework_Test $test, $time ) {
                wfDebugLog( $this->logChannel, 'End test ' . $this->getTestName( $test ) );
        }
-}
\ No newline at end of file
+}
index 848668a..76ef782 100644 (file)
@@ -233,7 +233,7 @@ class EditPageTest extends MediaWikiLangTestCase {
                        "",
                        "expected registered MediaWiki: page being created even if empty"
                )->doDeleteArticleReal( 'EditPageTest_testCreatePage' );
-               
+
                $this->assertEdit(
                        'MediaWiki:Ipb-default-expiry',
                        null,
index 57f8c19..6a2a0df 100644 (file)
@@ -424,7 +424,7 @@ class GlobalTest extends MediaWikiTestCase {
        /** array( shorthand, expected integer ) */
        public static function provideShorthand() {
                return array(
-                       # Null, empty ... 
+                       # Null, empty ...
                        array( '', -1 ),
                        array( '  ', -1 ),
                        array( null, -1 ),
index 3ac33a4..32bb49d 100644 (file)
@@ -116,7 +116,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         */
        function testTimestampParameter() {
                $now = wfTimestamp( TS_UNIX );
-               // We check that wfTimestamp doesn't return false (error) and use a LessThan assert 
+               // We check that wfTimestamp doesn't return false (error) and use a LessThan assert
                // for the cases where the test is run in a second boundary.
 
                $zero = wfTimestamp( TS_UNIX, 0 );
index 12ba226..d8a0f74 100644 (file)
@@ -176,7 +176,7 @@ class HttpTest extends MediaWikiTestCase {
  */
 class MWHttpRequestTester extends MWHttpRequest {
 
-       // function derived from the MWHttpRequest factory function but 
+       // function derived from the MWHttpRequest factory function but
        // returns appropriate tester class here
        public static function factory( $url, $options = null ) {
                if ( !Http::$httpEngine ) {
index c193179..e18295f 100644 (file)
@@ -273,18 +273,18 @@ class IPTest extends MediaWikiTestCase {
         */
        public static function provideToUnsigned() {
                return array(
-                       array ( 1, '0.0.0.1' ),
-                       array ( 16909060, '1.2.3.4' ),
-                       array ( 2130706433, '127.0.0.1' ),
-                       array ( '2147483648', '128.0.0.0' ),
-                       array ( '3735931646', '222.173.202.254' ),
-                       array ( pow( 2, 32 ) - 1, '255.255.255.255' ),
-                       array ( false, 'IN.VA.LI.D' ),
-                       array ( 1, '::1' ),
-                       array ( '42540766452641154071740215577757643572', '2001:0db8:85a3:0000:0000:8a2e:0370:7334' ),
-                       array ( '42540766452641154071740215577757643572', '2001:db8:85a3::8a2e:0370:7334' ),
-                       array ( false, 'IN:VA::LI:D' ),
-                       array ( false, ':::1' )
+                       array( 1, '0.0.0.1' ),
+                       array( 16909060, '1.2.3.4' ),
+                       array( 2130706433, '127.0.0.1' ),
+                       array( '2147483648', '128.0.0.0' ),
+                       array( '3735931646', '222.173.202.254' ),
+                       array( pow( 2, 32 ) - 1, '255.255.255.255' ),
+                       array( false, 'IN.VA.LI.D' ),
+                       array( 1, '::1' ),
+                       array( '42540766452641154071740215577757643572', '2001:0db8:85a3:0000:0000:8a2e:0370:7334' ),
+                       array( '42540766452641154071740215577757643572', '2001:db8:85a3::8a2e:0370:7334' ),
+                       array( false, 'IN:VA::LI:D' ),
+                       array( false, ':::1' )
                );
        }
 
@@ -303,18 +303,18 @@ class IPTest extends MediaWikiTestCase {
         */
        public static function provideToHex() {
                return array(
-                       array ( '00000001', '0.0.0.1' ),
-                       array ( '01020304', '1.2.3.4' ),
-                       array ( '7F000001', '127.0.0.1' ),
-                       array ( '80000000', '128.0.0.0' ),
-                       array ( 'DEADCAFE', '222.173.202.254' ),
-                       array ( 'FFFFFFFF', '255.255.255.255' ),
-                       array ( false, 'IN.VA.LI.D' ),
-                       array ( 'v6-00000000000000000000000000000001', '::1' ),
-                       array ( 'v6-20010DB885A3000000008A2E03707334', '2001:0db8:85a3:0000:0000:8a2e:0370:7334' ),
-                       array ( 'v6-20010DB885A3000000008A2E03707334', '2001:db8:85a3::8a2e:0370:7334' ),
-                       array ( false, 'IN:VA::LI:D' ),
-                       array ( false, ':::1' )
+                       array( '00000001', '0.0.0.1' ),
+                       array( '01020304', '1.2.3.4' ),
+                       array( '7F000001', '127.0.0.1' ),
+                       array( '80000000', '128.0.0.0' ),
+                       array( 'DEADCAFE', '222.173.202.254' ),
+                       array( 'FFFFFFFF', '255.255.255.255' ),
+                       array( false, 'IN.VA.LI.D' ),
+                       array( 'v6-00000000000000000000000000000001', '::1' ),
+                       array( 'v6-20010DB885A3000000008A2E03707334', '2001:0db8:85a3:0000:0000:8a2e:0370:7334' ),
+                       array( 'v6-20010DB885A3000000008A2E03707334', '2001:db8:85a3::8a2e:0370:7334' ),
+                       array( false, 'IN:VA::LI:D' ),
+                       array( false, ':::1' )
                );
        }
 
index 18f363f..6a9b44f 100644 (file)
@@ -27,4 +27,4 @@ class XmlTypeCheckTest extends MediaWikiTestCase {
                $this->assertFalse( $testXML->wellFormed );
        }
 
-}
\ No newline at end of file
+}
index d7c8e21..e680af6 100644 (file)
@@ -219,7 +219,7 @@ class ApiEditPageTest extends ApiTestCase {
                $this->assertEquals( 'Success', $re['edit']['result'] );
                // Check the page text is correct
                $text = WikiPage::factory( Title::newFromText( $name ) )->getContent( Revision::RAW )->getNativeData();
-               $this->assertEquals( $text, "== header ==\n\ntest");
+               $this->assertEquals( $text, "== header ==\n\ntest" );
 
                // Now on one that does
                $this->assertTrue( Title::newFromText( $name )->exists() );
@@ -233,7 +233,7 @@ class ApiEditPageTest extends ApiTestCase {
 
                $this->assertEquals( 'Success', $re2['edit']['result'] );
                $text = WikiPage::factory( Title::newFromText( $name ) )->getContent( Revision::RAW )->getNativeData();
-               $this->assertEquals( $text, "== header ==\n\ntest\n\n== header ==\n\ntest");
+               $this->assertEquals( $text, "== header ==\n\ntest\n\n== header ==\n\ntest" );
        }
 
        function testUndo() {
index 21c6247..5106be5 100644 (file)
@@ -251,7 +251,7 @@ class ApiTest extends ApiTestCase {
                }
 
                if ( isset( $rights['protect'] ) ) {
-                       $this->assertArrayHasKey( 'protecttoken', $tokens  );
+                       $this->assertArrayHasKey( 'protecttoken', $tokens );
                }
 
                return $tokens;
index 374eded..94ef9c6 100644 (file)
@@ -140,7 +140,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
        }
 
        protected function doLogin( $user = 'sysop' ) {
-               if( !array_key_exists( $user, self::$users ) ){
+               if ( !array_key_exists( $user, self::$users ) ) {
                        throw new MWException( "Can not log in to undefined user $user" );
                }
 
@@ -170,7 +170,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
                        'type' => 'edit|delete|protect|move|block|unblock|watch'
                ), $session, false, $user->user );
 
-               if( !array_key_exists( 'tokens', $data[0] ) ){
+               if ( !array_key_exists( 'tokens', $data[0] ) ) {
                        throw new MWException( 'Api failed to return a token list' );
                }
 
index 2548273..94f193e 100644 (file)
@@ -450,7 +450,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
                $this->deleteFileByFileName( $fileName );
                $this->deleteFileByContent( $filePath );
 
-               // Base upload params: 
+               // Base upload params:
                $params = array(
                        'action' => 'upload',
                        'stash' => 1,
@@ -462,7 +462,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
                // Upload chunks
                $chunkSessionKey = false;
                $resultOffset = 0;
-               // Open the file: 
+               // Open the file:
                $handle = @fopen( $filePath, "r" );
                if ( $handle === false ) {
                        $this->markTestIncomplete( "could not open file: $filePath" );
@@ -483,10 +483,10 @@ class ApiUploadTest extends ApiTestCaseUpload {
                                } catch ( UsageException $e ) {
                                        $this->markTestIncomplete( $e->getMessage() );
                                }
-                               // Make sure we got a valid chunk continue: 
+                               // Make sure we got a valid chunk continue:
                                $this->assertTrue( isset( $result['upload'] ) );
                                $this->assertTrue( isset( $result['upload']['filekey'] ) );
-                               // If we don't get a session key mark test incomplete. 
+                               // If we don't get a session key mark test incomplete.
                                if ( !isset( $result['upload']['filekey'] ) ) {
                                        $this->markTestIncomplete( "no filekey provided" );
                                }
@@ -510,11 +510,11 @@ class ApiUploadTest extends ApiTestCaseUpload {
                        } catch ( UsageException $e ) {
                                $this->markTestIncomplete( $e->getMessage() );
                        }
-                       // Make sure we got a valid chunk continue: 
+                       // Make sure we got a valid chunk continue:
                        $this->assertTrue( isset( $result['upload'] ) );
                        $this->assertTrue( isset( $result['upload']['filekey'] ) );
 
-                       // Check if we were on the last chunk: 
+                       // Check if we were on the last chunk:
                        if ( $params['offset'] + $chunkSize >= $fileSize ) {
                                $this->assertEquals( 'Success', $result['upload']['result'] );
                                break;
@@ -555,7 +555,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
 
                // clean up
                $this->deleteFileByFilename( $fileName );
-               // don't remove downloaded temporary file for fast subquent tests. 
+               // don't remove downloaded temporary file for fast subquent tests.
                //unlink( $filePath );
        }
 }
index 2642541..342f7d5 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/* 
+/*
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
index 87dc41c..c120ca3 100644 (file)
@@ -23,7 +23,7 @@ class MediaWikiParserTest {
        /** Include non core files as set in $wgParserTestFiles */
        const NO_CORE = 2;
        /** Include anything set via $wgParserTestFiles */
-       const WITH_ALL  = 3;  # CORE_ONLY | NO_CORE
+       const WITH_ALL = 3; # CORE_ONLY | NO_CORE
 
        /** @} */
 
@@ -51,28 +51,28 @@ class MediaWikiParserTest {
         * @return PHPUnit_Framework_TestSuite
         */
        public static function suite( $flags = self::CORE_ONLY ) {
-               if( is_string( $flags ) ) {
+               if ( is_string( $flags ) ) {
                        $flags = self::CORE_ONLY;
                }
                global $wgParserTestFiles, $IP;
 
-               $mwTestDir = $IP.'/tests/';
+               $mwTestDir = $IP . '/tests/';
 
                # Human friendly helpers
-               $wantsCore = ($flags & self::CORE_ONLY);
-               $wantsRest = ($flags & self::NO_CORE);
+               $wantsCore = ( $flags & self::CORE_ONLY );
+               $wantsRest = ( $flags & self::NO_CORE );
 
                # Will hold the .txt parser test files we will include
                $filesToTest = array();
 
                # Filter out .txt files
-               foreach( $wgParserTestFiles as $parserTestFile ) {
+               foreach ( $wgParserTestFiles as $parserTestFile ) {
                        $isCore = ( 0 === strpos( $parserTestFile, $mwTestDir ) );
 
-                       if( $isCore && $wantsCore ) {
+                       if ( $isCore && $wantsCore ) {
                                self::debug( "included core parser tests: $parserTestFile" );
                                $filesToTest[] = $parserTestFile;
-                       } elseif( !$isCore && $wantsRest ) {
+                       } elseif ( !$isCore && $wantsRest ) {
                                self::debug( "included non core parser tests: $parserTestFile" );
                                $filesToTest[] = $parserTestFile;
                        } else {
@@ -80,7 +80,7 @@ class MediaWikiParserTest {
                        }
                }
                self::debug( 'parser tests files: '
-                       . implode(' ', $filesToTest) );
+                       . implode( ' ', $filesToTest ) );
 
                $suite = new PHPUnit_Framework_TestSuite;
                foreach ( $filesToTest as $fileName ) {
index e4cb6b6..1d65e52 100755 (executable)
@@ -103,7 +103,7 @@ class PHPUnitMaintClass extends Maintenance {
 $maintClass = 'PHPUnitMaintClass';
 require RUN_MAINTENANCE_IF_MAIN;
 
-if ( !class_exists( 'PHPUnit_Runner_Version') ) {
+if ( !class_exists( 'PHPUnit_Runner_Version' ) ) {
        require_once 'PHPUnit/Runner/Version.php';
 }