jenkins-bot has submitted this change and it was merged.

Change subject: Fixed spacing
......................................................................


Fixed spacing

- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts

Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
---
M includes/AjaxDispatcher.php
M includes/AjaxResponse.php
M includes/GlobalFunctions.php
M includes/HtmlFormatter.php
M includes/HttpFunctions.php
M includes/Import.php
M includes/Linker.php
M includes/OutputPage.php
M includes/Preferences.php
M includes/Setup.php
M includes/UserMailer.php
M includes/changes/EnhancedChangesList.php
M includes/config/GlobalVarConfig.php
M includes/deferred/ViewCountUpdate.php
M includes/filebackend/SwiftFileBackend.php
M includes/filerepo/file/File.php
M includes/installer/WebInstallerPage.php
M includes/media/Bitmap.php
M includes/media/DjVu.php
M includes/page/Article.php
M includes/page/WikiFilePage.php
M includes/page/WikiPage.php
M includes/resourceloader/ResourceLoaderStartUpModule.php
M includes/search/SearchHighlighter.php
M includes/specials/SpecialWhatlinkshere.php
M languages/Language.php
M languages/messages/MessagesFrp.php
M tests/parser/parserTest.inc
M tests/phpunit/includes/StatusTest.php
M tests/phpunit/includes/api/ApiTestCase.php
M tests/phpunit/includes/exception/MWExceptionHandlerTest.php
M tests/phpunit/includes/media/DjVuTest.php
M tests/phpunit/includes/specials/SpecialMyLanguageTest.php
M tests/phpunit/structure/ResourcesTest.php
M tests/testHelpers.inc
35 files changed, 77 insertions(+), 77 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php
index c9ca128..dde8467 100644
--- a/includes/AjaxDispatcher.php
+++ b/includes/AjaxDispatcher.php
@@ -55,7 +55,7 @@
 
                $this->mode = "";
 
-               if ( ! empty( $_GET["rs"] ) ) {
+               if ( !empty( $_GET["rs"] ) ) {
                        $this->mode = "get";
                }
 
@@ -66,7 +66,7 @@
                switch ( $this->mode ) {
                        case 'get':
                                $this->func_name = isset( $_GET["rs"] ) ? 
$_GET["rs"] : '';
-                               if ( ! empty( $_GET["rsargs"] ) ) {
+                               if ( !empty( $_GET["rsargs"] ) ) {
                                        $this->args = $_GET["rsargs"];
                                } else {
                                        $this->args = array();
@@ -74,7 +74,7 @@
                                break;
                        case 'post':
                                $this->func_name = isset( $_POST["rs"] ) ? 
$_POST["rs"] : '';
-                               if ( ! empty( $_POST["rsargs"] ) ) {
+                               if ( !empty( $_POST["rsargs"] ) ) {
                                        $this->args = $_POST["rsargs"];
                                } else {
                                        $this->args = array();
@@ -105,7 +105,7 @@
 
                wfProfileIn( __METHOD__ );
 
-               if ( ! in_array( $this->func_name, $wgAjaxExportList ) ) {
+               if ( !in_array( $this->func_name, $wgAjaxExportList ) ) {
                        wfDebug( __METHOD__ . ' Bad Request for unknown 
function ' . $this->func_name . "\n" );
 
                        wfHttpError(
diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php
index a3808a5..41cbd24 100644
--- a/includes/AjaxResponse.php
+++ b/includes/AjaxResponse.php
@@ -132,7 +132,7 @@
         * @param string $text
         */
        function addText( $text ) {
-               if ( ! $this->mDisabled && $text ) {
+               if ( !$this->mDisabled && $text ) {
                        $this->mText .= $text;
                }
        }
@@ -141,7 +141,7 @@
         * Output text
         */
        function printText() {
-               if ( ! $this->mDisabled ) {
+               if ( !$this->mDisabled ) {
                        print $this->mText;
                }
        }
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 6850734..8bcd56e 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1873,7 +1873,7 @@
        $responseTime = round( ( microtime( true ) - $wgRequestTime ) * 1000 );
        $reportVars = array( 'wgBackendResponseTime' => $responseTime );
        if ( $wgShowHostnames ) {
-               $reportVars[ 'wgHostname' ] = wfHostname();
+               $reportVars['wgHostname'] = wfHostname();
        }
        return Skin::makeVariablesScript( $reportVars );
 }
diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php
index ebced70..02c6c5e 100644
--- a/includes/HtmlFormatter.php
+++ b/includes/HtmlFormatter.php
@@ -237,7 +237,7 @@
        private function fixLibXML( $html ) {
                wfProfileIn( __METHOD__ );
                static $replacements;
-               if ( ! $replacements ) {
+               if ( !$replacements ) {
                        // We don't include rules like '"' => '"' 
because entities had already been
                        // normalized by libxml. Using this function with input 
not sanitized by libxml is UNSAFE!
                        $replacements = new ReplacementArray( array(
diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index c9dd0c0..018c867 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -772,7 +772,7 @@
 
                if ( $this->followRedirects && $this->canFollowRedirects() ) {
                        wfSuppressWarnings();
-                       if ( ! curl_setopt( $curlHandle, 
CURLOPT_FOLLOWLOCATION, true ) ) {
+                       if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, 
true ) ) {
                                wfDebug( __METHOD__ . ": Couldn't set 
CURLOPT_FOLLOWLOCATION. " .
                                        "Probably safe_mode or open_basedir is 
set.\n" );
                                // Continue the processing. If it were in 
curl_setopt_array,
diff --git a/includes/Import.php b/includes/Import.php
index 6aab157..d86a640 100644
--- a/includes/Import.php
+++ b/includes/Import.php
@@ -533,7 +533,7 @@
        private function handleSiteInfo() {
                // Site info is useful, but not actually used for dump imports.
                // Includes a quick short-circuit to save performance.
-               if ( ! $this->mSiteInfoCallback ) {
+               if ( !$this->mSiteInfoCallback ) {
                        $this->reader->next();
                        return true;
                }
diff --git a/includes/Linker.php b/includes/Linker.php
index 1991694..3f31d1b 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -937,7 +937,7 @@
                $query = '', $unused1 = '', $unused2 = '', $time = false
        ) {
                global $wgEnableUploads, $wgUploadMissingFileUrl, 
$wgUploadNavigationUrl;
-               if ( ! $title instanceof Title ) {
+               if ( !$title instanceof Title ) {
                        return "<!-- ERROR -->" . htmlspecialchars( $label );
                }
                wfProfileIn( __METHOD__ );
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index fbdde64..b9cd6e8 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3582,7 +3582,7 @@
                        $group = $module->getGroup();
                        // Modules in groups different than the ones listed on 
top (see $styles assignment)
                        // will be placed in the "other" group
-                       $styles[ isset( $styles[$group] ) ? $group : 'other' 
][] = $name;
+                       $styles[isset( $styles[$group] ) ? $group : 'other'][] 
= $name;
                }
 
                // We want site, private and user styles to override 
dynamically added
diff --git a/includes/Preferences.php b/includes/Preferences.php
index b4bb6de..0cc926d 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1022,7 +1022,7 @@
         */
        static function searchPreferences( $user, IContextSource $context, 
&$defaultPreferences ) {
                foreach ( MWNamespace::getValidNamespaces() as $n ) {
-                       $defaultPreferences[ 'searchNs' . $n ] = array(
+                       $defaultPreferences['searchNs' . $n] = array(
                                'type' => 'api',
                        );
                }
diff --git a/includes/Setup.php b/includes/Setup.php
index 040aba5..d551e76 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -488,7 +488,7 @@
 }
 
 // Back compatibility for $wgRateLimitLog deprecated with 1.23
-if ( $wgRateLimitLog && ! array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) 
{
+if ( $wgRateLimitLog && !array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
        $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
 }
 
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index 25be921..913b430 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -397,7 +397,7 @@
                        if ( self::$mErrorString ) {
                                wfDebug( "Error sending mail: " . 
self::$mErrorString . "\n" );
                                return Status::newFatal( 'php-mail-error', 
self::$mErrorString );
-                       } elseif ( ! $sent ) {
+                       } elseif ( !$sent ) {
                                // mail function only tells if there's an error
                                wfDebug( "Unknown error sending mail\n" );
                                return Status::newFatal( 
'php-mail-error-unknown' );
diff --git a/includes/changes/EnhancedChangesList.php 
b/includes/changes/EnhancedChangesList.php
index 0c073c6..b471ea5 100644
--- a/includes/changes/EnhancedChangesList.php
+++ b/includes/changes/EnhancedChangesList.php
@@ -40,7 +40,7 @@
                        // @todo: deprecate constructing with Skin
                        $context = $obj->getContext();
                } else {
-                       if ( ! $obj instanceof IContextSource ) {
+                       if ( !$obj instanceof IContextSource ) {
                                throw new MWException( 'EnhancedChangesList 
must be constructed with a '
                                        . 'context source or skin.' );
                        }
diff --git a/includes/config/GlobalVarConfig.php 
b/includes/config/GlobalVarConfig.php
index 0d7f3f0..175a76e 100644
--- a/includes/config/GlobalVarConfig.php
+++ b/includes/config/GlobalVarConfig.php
@@ -72,7 +72,7 @@
                if ( !array_key_exists( $var, $GLOBALS ) ) {
                        throw new ConfigException( __METHOD__ . ": undefined 
variable: '$var'" );
                }
-               return $GLOBALS[ $var ];
+               return $GLOBALS[$var];
        }
 
        /**
@@ -83,6 +83,6 @@
         * @param mixed $value value to set
         */
        protected function setWithPrefix( $prefix, $name, $value ) {
-               $GLOBALS[ $prefix . $name ] = $value;
+               $GLOBALS[$prefix . $name] = $value;
        }
 }
diff --git a/includes/deferred/ViewCountUpdate.php 
b/includes/deferred/ViewCountUpdate.php
index 901ef9f..8282295 100644
--- a/includes/deferred/ViewCountUpdate.php
+++ b/includes/deferred/ViewCountUpdate.php
@@ -51,7 +51,7 @@
                if ( $wgHitcounterUpdateFreq <= 1 || $dbw->getType() == 
'sqlite' ) {
                        $id = $this->id;
                        $method = __METHOD__;
-                       $dbw->onTransactionIdle( function() use ( $dbw, $id, 
$method ) {
+                       $dbw->onTransactionIdle( function () use ( $dbw, $id, 
$method ) {
                                try {
                                        $dbw->update( 'page',
                                                array( 'page_counter = 
page_counter + 1' ),
diff --git a/includes/filebackend/SwiftFileBackend.php 
b/includes/filebackend/SwiftFileBackend.php
index 9ef23f8..9af53c3 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -1521,7 +1521,7 @@
                                        'mtime' => $this->convertSwiftDate( 
$rhdrs['last-modified'], TS_MW ),
                                        // Empty objects actually return no 
content-length header in Ceph
                                        'size'  => isset( 
$rhdrs['content-length'] ) ? (int)$rhdrs['content-length'] : 0,
-                                       'sha1'  => $rhdrs[ 
'x-object-meta-sha1base36'],
+                                       'sha1'  => 
$rhdrs['x-object-meta-sha1base36'],
                                        // Note: manifiest ETags are not an MD5 
of the file
                                        'md5'   => ctype_xdigit( $rhdrs['etag'] 
) ? $rhdrs['etag'] : null,
                                        'xattr' => array( 'metadata' => 
$metadata, 'headers' => $headers )
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index e970e38..260fde1 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1178,7 +1178,7 @@
                        return false;
                }
 
-               $this->tmpBucketedThumbCache[ $bucket ] = $tmpFile->getPath();
+               $this->tmpBucketedThumbCache[$bucket] = $tmpFile->getPath();
                // For the caching to work, we need to make the tmp file 
survive as long as
                // this object exists
                $tmpFile->bind( $this );
@@ -1204,8 +1204,8 @@
                        }
 
                        // Try to avoid reading from storage if the file was 
generated by this script
-                       if ( isset( $this->tmpBucketedThumbCache[ $bucket ] ) ) 
{
-                               $tmpPath = $this->tmpBucketedThumbCache[ 
$bucket ];
+                       if ( isset( $this->tmpBucketedThumbCache[$bucket] ) ) {
+                               $tmpPath = 
$this->tmpBucketedThumbCache[$bucket];
 
                                if ( file_exists( $tmpPath ) ) {
                                        return array(
diff --git a/includes/installer/WebInstallerPage.php 
b/includes/installer/WebInstallerPage.php
index c26028d..1c3be75 100644
--- a/includes/installer/WebInstallerPage.php
+++ b/includes/installer/WebInstallerPage.php
@@ -1048,7 +1048,7 @@
                                                'rawtext' => $skin,
                                                'value' => $this->getVar( 
"skin-$skin", true ), // all found skins enabled by default
                                        ) ) .
-                                       '<div 
class="config-skins-use-as-default">' . $radioButtons[ strtolower( $skin ) ] . 
'</div>' .
+                                       '<div 
class="config-skins-use-as-default">' . $radioButtons[strtolower( $skin )] . 
'</div>' .
                                        '</div>';
                        }
                } else {
diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php
index c0d9b71..b2802dd 100644
--- a/includes/media/Bitmap.php
+++ b/includes/media/Bitmap.php
@@ -329,7 +329,7 @@
                $animation_post = array();
                $decoderHint = array();
                if ( $params['mimeType'] == 'image/jpeg' ) {
-                       $qualityVal = isset( $params['quality'] ) ? (string) 
$params['quality'] : null;
+                       $qualityVal = isset( $params['quality'] ) ? 
(string)$params['quality'] : null;
                        $quality = array( '-quality', $qualityVal ?: '80' ); // 
80%
                        # Sharpening, see bug 6193
                        if ( ( $params['physicalWidth'] + 
$params['physicalHeight'] )
@@ -458,7 +458,7 @@
                                        list( $radius, $sigma ) = explode( 'x', 
$wgSharpenParameter );
                                        $im->sharpenImage( $radius, $sigma );
                                }
-                               $qualityVal = isset( $params['quality'] ) ? 
(string) $params['quality'] : null;
+                               $qualityVal = isset( $params['quality'] ) ? 
(string)$params['quality'] : null;
                                $im->setCompressionQuality( $qualityVal ?: 80 );
                        } elseif ( $params['mimeType'] == 'image/png' ) {
                                $im->setCompressionQuality( 95 );
diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php
index 299252b..daeb475 100644
--- a/includes/media/DjVu.php
+++ b/includes/media/DjVu.php
@@ -73,7 +73,7 @@
         * @return bool
         */
        function validateParam( $name, $value ) {
-               if ( $name === 'page' && trim( $value ) !== (string) intval( 
$value ) ) {
+               if ( $name === 'page' && trim( $value ) !== (string)intval( 
$value ) ) {
                        // Extra junk on the end of page, probably actually a 
caption
                        // e.g. [[File:Foo.djvu|thumb|Page 3 of the document 
shows foo]]
                        return false;
diff --git a/includes/page/Article.php b/includes/page/Article.php
index 2f27826..3f77195 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1240,7 +1240,7 @@
 
                $hookResult = wfRunHooks( 'BeforeDisplayNoArticleText', array( 
$this ) );
 
-               if ( ! $hookResult ) {
+               if ( !$hookResult ) {
                        return;
                }
 
diff --git a/includes/page/WikiFilePage.php b/includes/page/WikiFilePage.php
index 87cc7ba..bfcd4c3 100644
--- a/includes/page/WikiFilePage.php
+++ b/includes/page/WikiFilePage.php
@@ -201,7 +201,7 @@
                $title = $this->mTitle;
                $file = $this->mFile;
 
-               if ( ! $file instanceof LocalFile ) {
+               if ( !$file instanceof LocalFile ) {
                        wfDebug( __CLASS__ . '::' . __METHOD__ . " is not 
supported for this file\n" );
                        return TitleArray::newFromResult( new 
FakeResultWrapper( array() ) );
                }
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index fc269d8..8d0f0af 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -1603,7 +1603,7 @@
                                $oldContent = $rev->getContent();
                        }
 
-                       if ( ! $oldContent ) {
+                       if ( !$oldContent ) {
                                wfDebug( __METHOD__ . ": no page text\n" );
                                wfProfileOut( __METHOD__ );
                                return null;
@@ -2780,7 +2780,7 @@
                }
 
                $user = is_null( $user ) ? $wgUser : $user;
-               if ( ! wfRunHooks( 'ArticleDelete', array( &$this, &$user, 
&$reason, &$error, &$status ) ) ) {
+               if ( !wfRunHooks( 'ArticleDelete', array( &$this, &$user, 
&$reason, &$error, &$status ) ) ) {
                        if ( $status->isOK() ) {
                                // Hook aborted but didn't set a fatal status
                                $status->fatal( 'delete-hook-aborted' );
diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php 
b/includes/resourceloader/ResourceLoaderStartUpModule.php
index 56eb0a0..87782ec 100644
--- a/includes/resourceloader/ResourceLoaderStartUpModule.php
+++ b/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -233,7 +233,7 @@
                                );
                        }
 
-                       $registryData[ $name ] = array(
+                       $registryData[$name] = array(
                                'version' => $mtime,
                                'dependencies' => $module->getDependencies(),
                                'group' => $module->getGroup(),
diff --git a/includes/search/SearchHighlighter.php 
b/includes/search/SearchHighlighter.php
index b8b2bae..7923699 100644
--- a/includes/search/SearchHighlighter.php
+++ b/includes/search/SearchHighlighter.php
@@ -117,7 +117,7 @@
                                                }
                                                $offset = $endMatches[0][1] + 
strlen( $endMatches[0][0] );
                                        }
-                                       if ( ! $found ) {
+                                       if ( !$found ) {
                                                // couldn't find appropriate 
closing tag, skip
                                                $this->splitAndAdd( $textExt, 
$count, substr( $text, $start, strlen( $matches[0][0] ) ) );
                                                $start += strlen( 
$matches[0][0] );
@@ -184,7 +184,7 @@
                        $succ = true;
                        // check if first text contains all terms
                        foreach ( $terms as $term ) {
-                               if ( ! preg_match( "/$patPre" . $term . 
"$patPost/ui", $firstText ) ) {
+                               if ( !preg_match( "/$patPre" . $term . 
"$patPost/ui", $firstText ) ) {
                                        $succ = false;
                                        break;
                                }
@@ -194,7 +194,7 @@
                                $offsets[$first] = 0;
                        }
                }
-               if ( ! $snippets ) {
+               if ( !$snippets ) {
                        // match whole query on text
                        $this->process( $pat1, $textExt, $left, $contextchars, 
$snippets, $offsets );
                        // match whole query on templates/tables/images
@@ -279,7 +279,7 @@
 
                $processed = array();
                foreach ( $terms as $term ) {
-                       if ( ! isset( $processed[$term] ) ) {
+                       if ( !isset( $processed[$term] ) ) {
                                $pat3 = "/$patPre(" . $term . ")$patPost/ui"; 
// highlight word
                                $extract = preg_replace( $pat3,
                                        "\\1<span 
class='searchmatch'>\\2</span>\\3", $extract );
@@ -528,7 +528,7 @@
                        }
                        ++$lineno;
                        $m = array();
-                       if ( ! preg_match( $pat1, $line, $m ) ) {
+                       if ( !preg_match( $pat1, $line, $m ) ) {
                                continue;
                        }
                        --$contextlines;
diff --git a/includes/specials/SpecialWhatlinkshere.php 
b/includes/specials/SpecialWhatlinkshere.php
index 694bc83..81d40cc 100644
--- a/includes/specials/SpecialWhatlinkshere.php
+++ b/includes/specials/SpecialWhatlinkshere.php
@@ -151,7 +151,7 @@
                        $conds['pagelinks'][] = 'rd_from is NOT NULL';
                }
 
-               $queryFunc = function( $dbr, $table, $fromCol ) use ( $conds, 
$target, $limit ) {
+               $queryFunc = function ( $dbr, $table, $fromCol ) use ( $conds, 
$target, $limit ) {
                        global $wgUseLinkNamespaceDBFields;
                        // Read an extra row as an at-end check
                        $queryLimit = $limit + 1;
diff --git a/languages/Language.php b/languages/Language.php
index 88d0f23..8b41b4e 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -3125,7 +3125,7 @@
         */
        function getMagic( $mw ) {
                // Saves a function call
-               if ( ! $this->mMagicHookDone ) {
+               if ( !$this->mMagicHookDone ) {
                        $this->doMagicHook();
                }
 
@@ -3795,7 +3795,7 @@
                foreach ( $forms as $index => $form ) {
                        if ( preg_match( '/\d+=/i', $form ) ) {
                                $pos = strpos( $form, '=' );
-                               if ( substr( $form, 0, $pos ) === (string) 
$count ) {
+                               if ( substr( $form, 0, $pos ) === 
(string)$count ) {
                                        return substr( $form, $pos + 1 );
                                }
                                unset( $forms[$index] );
@@ -4443,7 +4443,7 @@
                if ( !isset( $format['avoid'] ) ) {
                        $format['avoid'] = false;
                }
-               if ( !isset( $format['noabbrevs' ] ) ) {
+               if ( !isset( $format['noabbrevs'] ) ) {
                        $format['noabbrevs'] = false;
                }
                $secondsMsg = wfMessage(
diff --git a/languages/messages/MessagesFrp.php 
b/languages/messages/MessagesFrp.php
index 3836ad9..8682ab0 100644
--- a/languages/messages/MessagesFrp.php
+++ b/languages/messages/MessagesFrp.php
@@ -290,17 +290,17 @@
 $linkTrail = '/^([a-zàâçéèêîœôû·’æäåāăëēïīòöōùü‘]+)(.*)$/sDu';
 
 $dateFormats = array(
-    'mdy time' => 'H:i',
-    'mdy date' => 'F j, Y',
-    'mdy both' => 'F j, Y "a" H:i',
+       'mdy time' => 'H:i',
+       'mdy date' => 'F j, Y',
+       'mdy both' => 'F j, Y "a" H:i',
 
-    'dmy time' => 'H:i',
-    'dmy date' => 'j F Y',
-    'dmy both' => 'j F Y "a" H:i',
+       'dmy time' => 'H:i',
+       'dmy date' => 'j F Y',
+       'dmy both' => 'j F Y "a" H:i',
 
-    'ymd time' => 'H:i',
-    'ymd date' => 'Y F j',
-    'ymd both' => 'Y F j "a" H:i',
+       'ymd time' => 'H:i',
+       'ymd date' => 'Y F j',
+       'ymd both' => 'Y F j "a" H:i',
 );
 
 $separatorTransformTable = array( ',' => "\xc2\xa0", '.' => ',' );
diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 5d05ca0..e76b9df 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -733,11 +733,11 @@
 
                if ( preg_match_all( $regex, $instring, $matches, 
PREG_SET_ORDER ) ) {
                        foreach ( $matches as $bits ) {
-                               $key = strtolower( $bits[ 'k' ] );
-                               if ( !isset( $bits[ 'v' ] ) ) {
+                               $key = strtolower( $bits['k'] );
+                               if ( !isset( $bits['v'] ) ) {
                                        $opts[$key] = true;
                                } else {
-                                       preg_match_all( $valueregex, $bits[ 'v' 
], $vmatches );
+                                       preg_match_all( $valueregex, 
$bits['v'], $vmatches );
                                        $opts[$key] = array_map( array( $this, 
'cleanupOption' ), $vmatches[0] );
                                        if ( count( $opts[$key] ) == 1 ) {
                                                $opts[$key] = $opts[$key][0];
diff --git a/tests/phpunit/includes/StatusTest.php 
b/tests/phpunit/includes/StatusTest.php
index 9e2f5b8..b2e4459 100644
--- a/tests/phpunit/includes/StatusTest.php
+++ b/tests/phpunit/includes/StatusTest.php
@@ -327,7 +327,7 @@
        public static function provideGetWikiTextAndHtml() {
                $testCases = array();
 
-               $testCases[ 'GoodStatus' ] = array(
+               $testCases['GoodStatus'] = array(
                        new Status(),
                        "Internal error: Status::getWikiText called for a good 
result, this is incorrect\n",
                        "<p>Internal error: Status::getWikiText called for a 
good result, this is incorrect\n</p>",
@@ -335,7 +335,7 @@
 
                $status = new Status();
                $status->ok = false;
-               $testCases[ 'GoodButNoError' ] = array(
+               $testCases['GoodButNoError'] = array(
                        $status,
                        "Internal error: Status::getWikiText: Invalid result 
object: no error text but not OK\n",
                        "<p>Internal error: Status::getWikiText: Invalid result 
object: no error text but not OK\n</p>",
@@ -343,7 +343,7 @@
 
                $status = new Status();
                $status->warning( 'fooBar!' );
-               $testCases[ '1StringWarning' ] = array(
+               $testCases['1StringWarning'] = array(
                        $status,
                        "<fooBar!>",
                        "<p>&lt;fooBar!&gt;\n</p>",
@@ -352,7 +352,7 @@
                $status = new Status();
                $status->warning( 'fooBar!' );
                $status->warning( 'fooBar2!' );
-               $testCases[ '2StringWarnings' ] = array(
+               $testCases['2StringWarnings'] = array(
                        $status,
                        "* <fooBar!>\n* <fooBar2!>\n",
                        "<ul><li> &lt;fooBar!&gt;</li>\n<li> 
&lt;fooBar2!&gt;</li></ul>\n",
@@ -360,7 +360,7 @@
 
                $status = new Status();
                $status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) 
 ) );
-               $testCases[ '1MessageWarning' ] = array(
+               $testCases['1MessageWarning'] = array(
                        $status,
                        "<fooBar!>",
                        "<p>&lt;fooBar!&gt;\n</p>",
@@ -369,7 +369,7 @@
                $status = new Status();
                $status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) 
) );
                $status->warning( new Message( 'fooBar2!' ) );
-               $testCases[ '2MessageWarnings' ] = array(
+               $testCases['2MessageWarnings'] = array(
                        $status,
                        "* <fooBar!>\n* <fooBar2!>\n",
                        "<ul><li> &lt;fooBar!&gt;</li>\n<li> 
&lt;fooBar2!&gt;</li></ul>\n",
@@ -399,7 +399,7 @@
        public static function provideGetMessage() {
                $testCases = array();
 
-               $testCases[ 'GoodStatus' ] = array(
+               $testCases['GoodStatus'] = array(
                        new Status(),
                        array( "Status::getMessage called for a good result, 
this is incorrect\n" ),
                        'internalerror_info'
@@ -407,7 +407,7 @@
 
                $status = new Status();
                $status->ok = false;
-               $testCases[ 'GoodButNoError' ] = array(
+               $testCases['GoodButNoError'] = array(
                        $status,
                        array( "Status::getMessage: Invalid result object: no 
error text but not OK\n" ),
                        'internalerror_info'
@@ -415,7 +415,7 @@
 
                $status = new Status();
                $status->warning( 'fooBar!' );
-               $testCases[ '1StringWarning' ] = array(
+               $testCases['1StringWarning'] = array(
                        $status,
                        array(),
                        'fooBar!'
@@ -437,7 +437,7 @@
 
                $status = new Status();
                $status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) 
 ) );
-               $testCases[ '1MessageWarning' ] = array(
+               $testCases['1MessageWarning'] = array(
                        $status,
                        array( 'foo', 'bar' ),
                        'fooBar!'
@@ -446,7 +446,7 @@
                $status = new Status();
                $status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) 
) );
                $status->warning( new Message( 'fooBar2!' ) );
-               $testCases[ '2MessageWarnings' ] = array(
+               $testCases['2MessageWarnings'] = array(
                        $status,
                        array( new Message( 'fooBar!', array( 'foo', 'bar' ) ), 
new Message( 'fooBar2!' ) ),
                        "* \$1\n* \$2"
diff --git a/tests/phpunit/includes/api/ApiTestCase.php 
b/tests/phpunit/includes/api/ApiTestCase.php
index 87ad2cd..0976b1a 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -152,8 +152,8 @@
 
                $data = $this->doApiRequest( array(
                        'action' => 'login',
-                       'lgname' => self::$users[ $user ]->username,
-                       'lgpassword' => self::$users[ $user ]->password ) );
+                       'lgname' => self::$users[$user]->username,
+                       'lgpassword' => self::$users[$user]->password ) );
 
                $token = $data[0]['login']['token'];
 
@@ -161,8 +161,8 @@
                        array(
                                'action' => 'login',
                                'lgtoken' => $token,
-                               'lgname' => self::$users[ $user ]->username,
-                               'lgpassword' => self::$users[ $user ]->password,
+                               'lgname' => self::$users[$user]->username,
+                               'lgpassword' => self::$users[$user]->password,
                        ),
                        $data[2]
                );
diff --git a/tests/phpunit/includes/exception/MWExceptionHandlerTest.php 
b/tests/phpunit/includes/exception/MWExceptionHandlerTest.php
index 2eb1c46..dc5dc6a 100644
--- a/tests/phpunit/includes/exception/MWExceptionHandlerTest.php
+++ b/tests/phpunit/includes/exception/MWExceptionHandlerTest.php
@@ -27,7 +27,7 @@
                $hasObject = false;
                $hasArray = false;
                foreach ( $trace as $frame ) {
-                       if ( ! isset( $frame['args'] ) ) {
+                       if ( !isset( $frame['args'] ) ) {
                                continue;
                        }
                        foreach ( $frame['args'] as $arg ) {
@@ -49,7 +49,7 @@
                $redacted = MWExceptionHandler::getRedactedTrace( $e );
 
                foreach ( $redacted as $frame ) {
-                       if ( ! isset( $frame['args'] ) ) {
+                       if ( !isset( $frame['args'] ) ) {
                                continue;
                        }
                        foreach ( $frame['args'] as $arg ) {
diff --git a/tests/phpunit/includes/media/DjVuTest.php 
b/tests/phpunit/includes/media/DjVuTest.php
index d779207..c0871f1 100644
--- a/tests/phpunit/includes/media/DjVuTest.php
+++ b/tests/phpunit/includes/media/DjVuTest.php
@@ -62,7 +62,7 @@
                $file = $this->dataFile( 'LoremIpsum.djvu', 'image/x.djvu' );
                $this->assertEquals(
                        "Lorem ipsum \n1 \n",
-                       (string) $this->handler->getPageText( $file, 1 ),
+                       (string)$this->handler->getPageText( $file, 1 ),
                        "Text layer of page 1 of file LoremIpsum.djvu should be 
'Lorem ipsum \n1 \n'"
                );
        }
diff --git a/tests/phpunit/includes/specials/SpecialMyLanguageTest.php 
b/tests/phpunit/includes/specials/SpecialMyLanguageTest.php
index 020d436..c09d68c 100644
--- a/tests/phpunit/includes/specials/SpecialMyLanguageTest.php
+++ b/tests/phpunit/includes/specials/SpecialMyLanguageTest.php
@@ -62,4 +62,4 @@
                        array( 'Page/Another', 'Page/Another', 'en', 'es' ),
                );
        }
-}
\ No newline at end of file
+}
diff --git a/tests/phpunit/structure/ResourcesTest.php 
b/tests/phpunit/structure/ResourcesTest.php
index d7742a6..55b2b6b 100644
--- a/tests/phpunit/structure/ResourcesTest.php
+++ b/tests/phpunit/structure/ResourcesTest.php
@@ -115,7 +115,7 @@
                                                        $media,
                                                        $file,
                                                        // XXX: Wrapped in an 
object to keep it out of PHPUnit output
-                                                       (object) array( 
'cssText' => $readStyleFile->invoke( $module, $file, $flip ) ),
+                                                       (object)array( 
'cssText' => $readStyleFile->invoke( $module, $file, $flip ) ),
                                                );
                                        }
                                }
diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc
index 8c24f39..d7342af 100644
--- a/tests/testHelpers.inc
+++ b/tests/testHelpers.inc
@@ -520,8 +520,8 @@
 
                                        $this->test = array(
                                                'test' => ParserTest::chomp( 
$this->sectionData['test'] ),
-                                               'input' => ParserTest::chomp( 
$this->sectionData[ $input ] ),
-                                               'result' => ParserTest::chomp( 
$this->sectionData[ $result ] ),
+                                               'input' => ParserTest::chomp( 
$this->sectionData[$input] ),
+                                               'result' => ParserTest::chomp( 
$this->sectionData[$result] ),
                                                'options' => ParserTest::chomp( 
$this->sectionData['options'] ),
                                                'config' => ParserTest::chomp( 
$this->sectionData['config'] ),
                                        );
@@ -579,7 +579,7 @@
 
                $data = $this->sectionData;
                $tokens = array_filter( $tokens, function ( $token ) use ( 
$data ) {
-                       return isset( $data[ $token ] );
+                       return isset( $data[$token] );
                } );
 
                if ( count( $tokens ) == 0 ) {
@@ -605,7 +605,7 @@
                }
 
                $tokens = array_values( $tokens );
-               return $tokens[ 0 ];
+               return $tokens[0];
        }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/148062
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Cscott <canan...@wikimedia.org>
Gerrit-Reviewer: Daniel Friesen <dan...@nadir-seen-fire.com>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: TTO <at.li...@live.com.au>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to