Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/148062
Change subject: Fixed spacing ...................................................................... Fixed spacing - Removed spaces after not operator (!) - Removed spaces inside array index - use tab as indent instead of spaces 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/filebackend/SwiftFileBackend.php M includes/filerepo/file/File.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 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/testHelpers.inc 27 files changed, 67 insertions(+), 67 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/148062/1 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 feca005..2981dbd 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1883,7 +1883,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 '"' => '&quot;' 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 19b2240..fa1a4fd 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3579,7 +3579,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 482c24b..fde52b5 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1023,7 +1023,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 2fe9213..df905ed 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -396,7 +396,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/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/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/languages/Language.php b/languages/Language.php index 887490b..a3e34f5 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(); } @@ -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 24c5aba..306c556 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -723,11 +723,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><fooBar!>\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> <fooBar!></li>\n<li> <fooBar2!></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><fooBar!>\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> <fooBar!></li>\n<li> <fooBar2!></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/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: newchange Gerrit-Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits