jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/367454 )

Change subject: phpcs changes for mediawiki-codesniffer 0.10.1
......................................................................


phpcs changes for mediawiki-codesniffer 0.10.1

Change-Id: I8e8400f41fb942a4f141dd945d4bda2370cb5d74
---
M tests/DBList.php
M tests/WgConfTestCase.php
M tests/dblistTest.php
M wmf-config/CirrusSearch-common.php
M wmf-config/CirrusSearch-labs.php
M wmf-config/CirrusSearch-production.php
M wmf-config/CommonSettings.php
M wmf-config/HHVMRequestInit.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/StartProfiler.php
M wmf-config/Wikibase.php
M wmf-config/logging.php
M wmf-config/mobile-labs.php
M wmf-config/mobile.php
M wmf-config/throttle.php
15 files changed, 26 insertions(+), 31 deletions(-)

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



diff --git a/tests/DBList.php b/tests/DBList.php
index 1dd9fd0..a0607e7 100644
--- a/tests/DBList.php
+++ b/tests/DBList.php
@@ -48,4 +48,3 @@
                return in_array( $dbname, self::$wiki_projects );
        }
 }
-
diff --git a/tests/WgConfTestCase.php b/tests/WgConfTestCase.php
index f35b705..3fed8ec 100644
--- a/tests/WgConfTestCase.php
+++ b/tests/WgConfTestCase.php
@@ -70,7 +70,7 @@
         * the only way to achieve that is when leaving the data provider scope.
         */
        function __destruct() {
-               if ( ! empty( $this->globals ) or ! empty( 
$this->globalsToUnset ) ) {
+               if ( !empty( $this->globals ) || !empty( $this->globalsToUnset 
) ) {
                        throw new Exception(
                                __CLASS__ . ": setGlobals() used without 
restoreGlobals().\n" .
                                "Mangled globals:\n" . var_export( 
$this->globals, true ) .
diff --git a/tests/dblistTest.php b/tests/dblistTest.php
index 7a5f857..6ac7014 100644
--- a/tests/dblistTest.php
+++ b/tests/dblistTest.php
@@ -120,4 +120,3 @@
                $this->assertEquals( $exprDbs, $expectedDbs );
        }
 }
-
diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 46e4aef..b440d43 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -178,7 +178,7 @@
        'numBoostedLangs' => 2,
 ];
 
-$wgHooks['CirrusSearchMappingConfig'][] = function( array &$config, 
$mappingConfigBuilder ) {
+$wgHooks['CirrusSearchMappingConfig'][] = function ( array &$config, 
$mappingConfigBuilder ) {
        $config['page']['properties']['popularity_score'] = [
                'type' => 'double',
        ];
diff --git a/wmf-config/CirrusSearch-labs.php b/wmf-config/CirrusSearch-labs.php
index 97824a3..93143f2 100644
--- a/wmf-config/CirrusSearch-labs.php
+++ b/wmf-config/CirrusSearch-labs.php
@@ -57,4 +57,3 @@
 
 # Quirks for elasticsearch >5 <5.3
 $wgCirrusSearchElasticQuirks['query_string_max_determinized_states'] = true;
-
diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index e5ad326..ef888a7 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -102,4 +102,3 @@
 $wgCirrusSearchIndexDeletes = $wmgCirrusSearchIndexDeletes;
 // Enable searching archive
 $wgCirrusSearchEnableArchive = $wmgCirrusSearchEnableArchive;
-
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 626555a..bfb6e84 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -297,7 +297,7 @@
 $wgLocalisationCacheConf['manualRecache'] = true;
 
 // T29320: skip MessageBlobStore::clear(); handle via refreshMessageBlobs.php 
instead
-$wgHooks['LocalisationCacheRecache'][] = function( $cache, $code, &$allData, 
&$purgeBlobs = true ) {
+$wgHooks['LocalisationCacheRecache'][] = function ( $cache, $code, &$allData, 
&$purgeBlobs = true ) {
        $purgeBlobs = false;
        return true;
 };
@@ -406,7 +406,7 @@
 
 // Enforce password policy when users login on other wikis
 if ( $wmgUseCentralAuth ) {
-       $wgHooks['PasswordPoliciesForUser'][] = function( User $user, array 
&$effectivePolicy ) {
+       $wgHooks['PasswordPoliciesForUser'][] = function ( User $user, array 
&$effectivePolicy ) {
                $central = CentralAuthUser::getInstance( $user );
                if ( !$central->exists() ) {
                        return true;
@@ -1034,7 +1034,7 @@
 
        $wgSecurePollUseNamespace = $wmgSecurePollUseNamespace;
        $wgSecurePollScript = 'auth-api.php';
-       $wgHooks['SecurePoll_JumpUrl'][] = function( $page, &$url ) {
+       $wgHooks['SecurePoll_JumpUrl'][] = function ( $page, &$url ) {
                global $site, $lang;
 
                $url = wfAppendQuery( $url, [ 'site' => $site, 'lang' => $lang 
] );
@@ -1128,7 +1128,7 @@
 $wgNoFollowLinks = true; // In case the MediaWiki default changed, T44594
 
 # XFF log for vandal tracking
-$wgExtensionFunctions[] = function() {
+$wgExtensionFunctions[] = function () {
        global $wmfUdp2logDest, $wgRequest;
        if (
                isset( $_SERVER['REQUEST_METHOD'] )
@@ -1156,7 +1156,7 @@
 }
 
 if ( $wmgUseFooterContactLink ) {
-       $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
+       $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function ( $sk, &$tpl 
) {
                $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'contact-url' )->escaped() ],
                        $sk->msg( 'contact' )->text() );
                $tpl->set( 'contact', $contactLink );
@@ -1165,7 +1165,7 @@
        };
 }
 if ( $wmgUseFooterCodeOfConductLink ) {
-       $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) 
{
+       $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function ( $sk, &$tpl 
) {
                $contactLink = Html::element( 'a', [ 'href' => $sk->msg( 
'wm-codeofconduct-url' )->escaped() ],
                        $sk->msg( 'wm-codeofconduct' )->text() );
                $tpl->set( 'wm-codeofconduct', $contactLink );
@@ -1555,7 +1555,7 @@
 }
 
 // log failed login attempts
-$wgHooks['AuthManagerLoginAuthenticateAudit'][] = function( $response, $user, 
$username ) {
+$wgHooks['AuthManagerLoginAuthenticateAudit'][] = function ( $response, $user, 
$username ) {
        $guessed = false;
        if ( !$user && $username ) {
                $user = User::newFromName( $username );
@@ -1582,7 +1582,7 @@
        }
 };
 // T150554 log successful attempts too
-$wgHooks['AuthManagerLoginAuthenticateAudit'][] = function( $response, $user, 
$username ) {
+$wgHooks['AuthManagerLoginAuthenticateAudit'][] = function ( $response, $user, 
$username ) {
        if ( $response->status === \MediaWiki\Auth\AuthenticationResponse::PASS 
) {
                global $wgRequest;
                $headers = function_exists( 'apache_request_headers' ) ? 
apache_request_headers() : [];
@@ -1602,7 +1602,7 @@
        }
 };
 
-$wgHooks['PrefsEmailAudit'][] = function( $user, $old, $new ) {
+$wgHooks['PrefsEmailAudit'][] = function ( $user, $old, $new ) {
        if ( $user->isAllowed( 'delete' ) ) {
                global $wgRequest;
                $headers = function_exists( 'apache_request_headers' ) ? 
apache_request_headers() : [];
@@ -1621,7 +1621,7 @@
 };
 
 // log sysop password changes
-$wgHooks['ChangeAuthenticationDataAudit'][] = function( $req, $status ) {
+$wgHooks['ChangeAuthenticationDataAudit'][] = function ( $req, $status ) {
        $user = User::newFromName( $req->username );
        $status = Status::wrap( $status );
        if ( $user->isAllowed( 'delete' ) && $req instanceof 
\MediaWiki\Auth\PasswordAuthenticationRequest ) {
@@ -1756,7 +1756,7 @@
        // Please don't interfere with our hundreds of wikis ability to manage 
themselves.
        // Only use this shitty hack for enwiki. Thanks.
        // -- brion 2008-04-10
-       $wgHooks['getUserPermissionsErrorsExpensive'][] = function( &$title, 
&$user, $action, &$result ) {
+       $wgHooks['getUserPermissionsErrorsExpensive'][] = function ( &$title, 
&$user, $action, &$result ) {
                if ( $action !== 'delete' && $action !== 'move' ) {
                        return true;
                }
@@ -2481,7 +2481,7 @@
                                'cutoff' => 0.65,
                                'use_wikimedia_extra' => true,
                                'config' => [
-                                       'servers' => array_map( function( $host 
) {
+                                       'servers' => array_map( function ( 
$host ) {
                                                return [
                                                        'host' => $host,
                                                        'port' => 9243,
@@ -2917,7 +2917,7 @@
 }
 
 // Workaround for T142663 - override flat arrays
-$wgExtensionFunctions[] = function() {
+$wgExtensionFunctions[] = function () {
        global $wmgRelatedArticlesFooterWhitelistedSkins, 
$wgRelatedArticlesFooterWhitelistedSkins;
 
        $wgRelatedArticlesFooterWhitelistedSkins = 
$wmgRelatedArticlesFooterWhitelistedSkins;
@@ -3310,7 +3310,7 @@
                $wgOAuthGroupsToNotify = [ 'oauthadmin' ];
        }
 
-       $wgHooks['OAuthReplaceMessage'][] = function( &$msgKey ) {
+       $wgHooks['OAuthReplaceMessage'][] = function ( &$msgKey ) {
                if ( $msgKey === 'mwoauth-form-privacypolicy-link' ) {
                        $msgKey = 'wikimedia-oauth-privacy-link';
                }
@@ -3426,7 +3426,7 @@
 }
 
 // On Special:Version, link to useful release notes
-$wgHooks['SpecialVersionVersionUrl'][] = function( $wgVersion, &$versionUrl ) {
+$wgHooks['SpecialVersionVersionUrl'][] = function ( $wgVersion, &$versionUrl ) 
{
        $matches = [];
        preg_match( "/^(\d+\.\d+)(?:\.0-)?wmf\.?(\d+)?$/", $wgVersion, $matches 
);
        if ( $matches ) {
diff --git a/wmf-config/HHVMRequestInit.php b/wmf-config/HHVMRequestInit.php
index 5ca89ad..9128263 100644
--- a/wmf-config/HHVMRequestInit.php
+++ b/wmf-config/HHVMRequestInit.php
@@ -27,7 +27,7 @@
  */
 define( 'E_FATAL', E_ERROR | ( 1 << 24 ) );
 
-set_error_handler( function( $errno, $message, $file, $line, $context, /* 
nonstandard! */ $backtrace ) {
+set_error_handler( function ( $errno, $message, $file, $line, $context, /* 
nonstandard! */ $backtrace ) {
        syslog( LOG_ERR, json_encode( [
                'message'   => $message,
                'file'      => $file,
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index c29f9b5..62811ba 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -27,7 +27,7 @@
        // Set configuration string placeholder 'variant' to 'beta'.
        // Add a wikitag of 'beta' that can be used to merge beta specific and
        // default settings by using `'+beta' => array(...),`
-       $wgConf->siteParamsCallback = function( $conf, $wiki ) {
+       $wgConf->siteParamsCallback = function ( $conf, $wiki ) {
                $wikiTags = [ 'beta' ];
 
                $betaDblistTags = [ 'flow_only_labs' ];
diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php
index 26e69d0..a3edd97 100644
--- a/wmf-config/StartProfiler.php
+++ b/wmf-config/StartProfiler.php
@@ -32,7 +32,7 @@
                && is_writable( '/tmp/xhprof' )
        ) {
                xhprof_enable();
-               register_shutdown_function( function() {
+               register_shutdown_function( function () {
                        $prof = xhprof_disable();
                        $titleFormat = "%-75s %6s %13s %13s %13s\n";
                        $format = "%-75s %6d %13.3f %13.3f %13.3f%%\n";
@@ -41,7 +41,7 @@
                                return;
                        }
                        $total = $prof['main()']['wt'];
-                       uksort( $prof, function( $a, $b ) use ( $prof ) {
+                       uksort( $prof, function ( $a, $b ) use ( $prof ) {
                                if ( $prof[$a]['wt'] < $prof[$b]['wt'] ) {
                                        return 1;
                                } elseif ( $prof[$a]['wt'] > $prof[$b]['wt'] ) {
diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index 4943a1c..7ef0e97 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -182,7 +182,7 @@
        $wgWBClientSettings['siteGroup'] = $wmgWikibaseSiteGroup;
        $wgWBClientSettings['otherProjectsLinksByDefault'] = true;
 
-       $wgWBClientSettings['excludeNamespaces'] = function() {
+       $wgWBClientSettings['excludeNamespaces'] = function () {
                global $wgDBname;
 
                // @fixme 102 is LiquidThread comments on wikinews and 
elsewhere?
diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 647201d..4327ed3 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -71,7 +71,7 @@
                         * reduce variance of messages that expand to include 
per-request
                         * details such as session ids.
                         */
-                       return function( array $record ) {
+                       return function ( array $record ) {
                                $nm = $record['message'];
                                if ( strpos( $nm, '<a href=' ) !== false ) {
                                        // Remove documentation anchor tags
diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php
index a27e368..3021286 100644
--- a/wmf-config/mobile-labs.php
+++ b/wmf-config/mobile-labs.php
@@ -19,7 +19,7 @@
 $wgMFForceSecureLogin = false;
 
 // T49647
-$wgHooks['EnterMobileMode'][] = function() {
+$wgHooks['EnterMobileMode'][] = function () {
        global $wgCentralAuthCookieDomain, $wgHooks;
        $domainRegexp = '/(?<!\.m)\.wikimedia\.beta\.wmflabs\.org$/';
        $mobileDomain = '.m.wikimedia.beta.wmflabs.org';
@@ -33,4 +33,3 @@
                }
        };
 };
-
diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 227b654..1fcd38d 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -36,7 +36,7 @@
                $wgGroupPermissions['sysop']['jsonconfig-flush'] = true;
        }
 
-       $wgHooks['EnterMobileMode'][] = function() {
+       $wgHooks['EnterMobileMode'][] = function () {
                global $wgCentralAuthCookieDomain, $wgHooks, 
$wgIncludeLegacyJavaScript;
 
                // Disable loading of legacy wikibits in the mobile web 
experience
diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index d3ed551..f3ec297 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -42,7 +42,7 @@
 /**
  * Helper to easily add a throttling request.
  */
-$wgExtensionFunctions[] = function() {
+$wgExtensionFunctions[] = function () {
        global $wmgThrottlingExceptions, $wgDBname, $wgRequest;
 
        foreach ( $wmgThrottlingExceptions as $options ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e8400f41fb942a4f141dd945d4bda2370cb5d74
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
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