summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1b14b25)
Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull
Change-Id: I673f71fd0dfc8d6ba1ce6c3d5da21787ff95cb32
- if ( isset( $htmlelements[$t = strtolower( $t )] ) ) {
+ $t = strtolower( $t );
+ if ( isset( $htmlelements[$t] ) ) {
# Check our stack
if ( $slash && isset( $htmlsingleonly[$t] ) ) {
$badtag = true;
# Check our stack
if ( $slash && isset( $htmlsingleonly[$t] ) ) {
$badtag = true;
list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
$badtag = false;
list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
$badtag = false;
- if ( isset( $htmlelements[$t = strtolower( $t )] ) ) {
+ $t = strtolower( $t );
+ if ( isset( $htmlelements[$t] ) ) {
if ( is_callable( $processCallback ) ) {
call_user_func_array( $processCallback, array( &$params, $args ) );
}
if ( is_callable( $processCallback ) ) {
call_user_func_array( $processCallback, array( &$params, $args ) );
}
// Capture any PHP warnings from the output buffer and append them to the
// error list if we're in debug mode.
// Capture any PHP warnings from the output buffer and append them to the
// error list if we're in debug mode.
- if ( $context->getDebug() && strlen( $warnings = ob_get_contents() ) ) {
- $this->errors[] = $warnings;
+ if ( $context->getDebug() ) {
+ $warnings = ob_get_contents();
+ if ( strlen( $warnings ) ) {
+ $this->errors[] = $warnings;
+ }
}
// Save response to file cache unless there are errors
}
// Save response to file cache unless there are errors
$response = $fileCache->fetchText();
// Capture any PHP warnings from the output buffer and append them to the
// response in a comment if we're in debug mode.
$response = $fileCache->fetchText();
// Capture any PHP warnings from the output buffer and append them to the
// response in a comment if we're in debug mode.
- if ( $context->getDebug() && strlen( $warnings = ob_get_contents() ) ) {
- $response = self::makeComment( $warnings ) . $response;
+ if ( $context->getDebug() ) {
+ $warnings = ob_get_contents();
+ if ( strlen( $warnings ) ) {
+ $response = self::makeComment( $warnings ) . $response;
+ }
}
// Remove the output buffer and output the response
ob_end_clean();
}
// Remove the output buffer and output the response
ob_end_clean();
)->inContentLanguage() );
}
)->inContentLanguage() );
}
- if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
+ $ns = $request->getVal( 'namespace', null );
+ if ( $ns !== null && $ns !== '' ) {
$this->opts['namespace'] = intval( $ns );
} else {
$this->opts['namespace'] = '';
$this->opts['namespace'] = intval( $ns );
} else {
$this->opts['namespace'] = '';
$target = $userObj->getName();
$out->addSubtitle( $this->getSubTitle( $userObj ) );
$target = $userObj->getName();
$out->addSubtitle( $this->getSubTitle( $userObj ) );
- if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
+ $ns = $request->getVal( 'namespace', null );
+ if ( $ns !== null && $ns !== '' ) {
$options['namespace'] = intval( $ns );
} else {
$options['namespace'] = '';
$options['namespace'] = intval( $ns );
} else {
$options['namespace'] = '';
$m = array();
if ( preg_match( $prefixRegexp, $dbkey, $m ) ) {
$p = $m[1];
$m = array();
if ( preg_match( $prefixRegexp, $dbkey, $m ) ) {
$p = $m[1];
- if ( ( $ns = $this->language->getNsIndex( $p ) ) !== false ) {
+ $ns = $this->language->getNsIndex( $p );
+ if ( $ns !== false ) {
# Ordinary namespace
$dbkey = $m[2];
$parts['namespace'] = $ns;
# Ordinary namespace
$dbkey = $m[2];
$parts['namespace'] = $ns;
}
}
// The absolute filename itself will differ from install to install so don't leave it out
}
}
// The absolute filename itself will differ from install to install so don't leave it out
- if ( ( $path = realpath( $file ) ) !== false ) {
+ $path = realpath( $file );
+ if ( $path !== false ) {
$state .= $path;
} else {
$state .= $file;
$state .= $path;
} else {
$state .= $file;
private function getNsIndex( $namespace ) {
global $wgContLang;
private function getNsIndex( $namespace ) {
global $wgContLang;
- if ( ( $result = $wgContLang->getNsIndex( $namespace ) ) !== false ) {
+ $result = $wgContLang->getNsIndex( $namespace );
+ if ( $result !== false ) {
return $result;
}
$ns = intval( $namespace );
return $result;
}
$ns = intval( $namespace );