Searched for /([^\d\w\s\)\]]\s*)- \d/ to find potential issues.
It seems there's no PHPCS check for this, huh.
Also fixed typo in a comment in LoginSignupSpecialPage.
Change-Id: Iaab1a1f5a9f234971e550e7909aa5c3e0c02a983
# Max is +14:00 and min is -12:00, see:
# https://en.wikipedia.org/wiki/Timezone
$minDiff = min( $minDiff, 840 ); # 14:00
- $minDiff = max( $minDiff, - 720 ); # -12:00
+ $minDiff = max( $minDiff, -720 ); # -12:00
return 'Offset|' . $minDiff;
}
}
$count = 0;
$value =
preg_replace( '/,([ \t]*[}\]][^"\r\n]*([\r\n]|$)|[ \t]*[\r\n][ \t\r\n]*[}\]])/', '$1',
- $value, - 1, $count );
+ $value, -1, $count );
if ( $count > 0 ) {
$result = json_decode( $value, $assoc );
if ( JSON_ERROR_NONE === json_last_error() ) {
if ( preg_match( $spat, $text, $matches, PREG_OFFSET_CAPTURE, $start ) ) {
$epat = '';
foreach ( $matches as $key => $val ) {
- if ( $key > 0 && $val[1] != - 1 ) {
+ if ( $key > 0 && $val[1] != -1 ) {
if ( $key == 2 ) {
// see if this is an image link
- $ns = substr( $val[0], 2, - 1 );
+ $ns = substr( $val[0], 2, -1 );
if ( $wgContLang->getNsIndex( $ns ) != NS_FILE ) {
break;
}
// $snippets = array_map( 'htmlspecialchars', $extended );
$snippets = $extended;
- $last = - 1;
+ $last = -1;
$extract = '';
foreach ( $snippets as $index => $line ) {
- if ( $last == - 1 ) {
+ if ( $last == -1 ) {
$extract .= $line; // first line
} elseif ( $last + 1 == $index
&& $offsets[$last] + strlen( $snippets[$last] ) >= strlen( $all[$last] )
// B/C for old extensions that haven't been converted to AuthManager (or have been
// but somebody is using the old version) and still use templates via the
// UserCreateForm/UserLoginForm hook.
- // 'header' used by ConfirmEdit, CondfirmAccount, Persona, WikimediaIncubator, SemanticSignup
+ // 'header' used by ConfirmEdit, ConfirmAccount, Persona, WikimediaIncubator, SemanticSignup
// 'formheader' used by MobileFrontend
$fieldDefinitions['header'] = [
'type' => 'info',
'raw' => true,
'default' => $template->get( 'header' ) ?: $template->get( 'formheader' ),
- 'weight' => - 110,
+ 'weight' => -110,
];
}
if ( $this->mEntryError ) {