// Figure out which clusters need to be checked
$lbs = array();
if ( $cluster === '*' ) {
- wfGetLBFactory()->forEachLB( function( LoadBalancer $lb ) use ( &$lbs ) {
+ wfGetLBFactory()->forEachLB( function ( LoadBalancer $lb ) use ( &$lbs ) {
$lbs[] = $lb;
} );
} elseif ( $cluster !== false ) {
$out->setPageTitle( $context->msg( 'api-format-title' ) );
$header = $context->msg( 'api-format-prettyprint-header' )
- ->params( $format, strtolower( $format ) )
- ->parseAsBlock();
+ ->params( $format, strtolower( $format ) )
+ ->parseAsBlock();
$out->addHTML(
Html::rawElement( 'div', array( 'class' => 'api-pretty-header' ),
ApiHelp::fixHelpLinks( $header )
// then there's an appropriate Vary header set by whatever set
// their non-default language.
wfDebug( __METHOD__ . ": downgrading cache mode 'public' to " .
- "'anon-public-user-private' due to uselang=user\n" );
+ "'anon-public-user-private' due to uselang=user\n" );
$mode = 'anon-public-user-private';
}
private function stripFieldPrefix( array $fieldNames ) {
$start = strlen( $this->fieldPrefix );
- return array_map( function( $fieldName ) use ( $start ) {
+ return array_map( function ( $fieldName ) use ( $start ) {
return substr( $fieldName, $start );
}, $fieldNames );
}
if ( $channel === 'wfLogDBError' ) {
// wfLogDBError messages are emitted if a database log location is
// specfied.
- $shouldEmit = (bool) $wgDBerrorLog;
+ $shouldEmit = (bool)$wgDBerrorLog;
} elseif ( $channel === 'wfErrorLog' ) {
// All messages on the wfErrorLog channel should be emitted.
*/
public function getLogger( $channel ) {
if ( !isset( $this->singletons[$channel] ) ) {
- $this->singletons[$channel] = new MWLoggerLegacyLogger($channel);
+ $this->singletons[$channel] = new MWLoggerLegacyLogger( $channel );
}
return $this->singletons[$channel];
}
$this->openSink();
}
- $text = (string) $record['formatted'];
+ $text = (string)$record['formatted'];
if ( $this->useUdp() ) {
// Clean it up for the multiplexer
$localPath = $this->getLocalPath( $templatePath );
if ( file_exists( $localPath ) ) {
$content = file_get_contents( $localPath );
- $templates[ $alias ] = $content;
+ $templates[$alias] = $content;
} else {
$msg = __METHOD__ . ": template file not found: \"$localPath\"";
wfDebugLog( 'resourceloader', $msg );
Xml::label( $this->msg( 'import-comment' )->text(), 'mw-import-comment' ) .
"</td>
<td class='mw-input'>" .
- Xml::input( 'log-comment', 50,
+ Xml::input( 'log-comment', 50,
( $this->sourceName == 'upload' ? $this->logcomment : '' ),
array( 'id' => 'mw-import-comment', 'type' => 'text' ) ) . ' ' .
"</td>
// The form should be visible on each request (inclusive requests with submitted forms), so
// return always false here.
$htmlForm->setSubmitCallback(
- function() {
+ function () {
return false;
}
);
private function assertNotReal() {
global $wgDBprefix;
- if( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX && $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX ) {
+ if ( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX && $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX ) {
throw new MWException( "Can't create user on real database" );
}
}
$passwordFactory = $this->user->getPasswordFactory();
$oldDefaultType = $passwordFactory->getDefaultType();
- // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
+ // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
$passwordFactory->setDefaultType( 'A' );
- $newPassword = $passwordFactory->newFromPlaintext( $password , $this->user->getPassword() );
+ $newPassword = $passwordFactory->newFromPlaintext( $password, $this->user->getPassword() );
$change = false;
if ( !$this->user->getPassword()->equals( $newPassword ) ) {