Merge "Remove comments literally repeating the next line of code"

This commit is contained in:
jenkins-bot 2019-03-01 02:37:27 +00:00 committed by Gerrit Code Review
commit 6daa17a2a0
18 changed files with 8 additions and 27 deletions

View file

@ -983,7 +983,6 @@ class Html {
$attribs["xmlns:$tag"] = $ns;
}
} else { // HTML5
// DOCTYPE
$ret .= "<!DOCTYPE html>\n";
}

View file

@ -102,10 +102,8 @@ class ApiFeedWatchlist extends ApiBase {
$fauxReqArr['wlallrev'] = '';
}
// Create the request
$fauxReq = new FauxRequest( $fauxReqArr );
// Execute
$module = new ApiMain( $fauxReq );
$module->execute();

View file

@ -1592,17 +1592,14 @@ class ApiMain extends ApiBase {
$this->setupExternalResponse( $module, $params );
}
// Execute
$module->execute();
Hooks::run( 'APIAfterExecute', [ &$module ] );
$this->reportUnusedParams();
if ( !$this->mInternalMode ) {
// append Debug information
MWDebug::appendDebugInfoToApiResult( $this->getContext(), $this->getResult() );
// Print result data
$this->printResult();
}
}

View file

@ -287,7 +287,7 @@ class ApiQuery extends ApiBase {
}
} elseif ( $modCacheMode === 'public' ) {
// do nothing, if it's public already it will stay public
} else { // private
} else {
$cacheMode = 'private';
}

View file

@ -85,7 +85,7 @@ class ChangeTagsLogItem extends RevisionItemBase {
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
// Comment
$comment = $this->list->getLanguage()->getDirMark() .
$formatter->getComment();

View file

@ -315,7 +315,7 @@ class SquidPurgeClient {
}
if ( $this->readState == 'status' ) {
$this->processStatusLine( $lines[0] );
} else { // header
} else {
$this->processHeaderLine( $lines[0] );
}
$this->readBuffer = $lines[1];

View file

@ -326,7 +326,7 @@ class EtcdConfig implements Config, LoggerAwareInterface {
private function unserialize( $string ) {
if ( $this->encoding === 'YAML' ) {
return yaml_parse( $string );
} else { // JSON
} else {
return json_decode( $string, true );
}
}

View file

@ -455,8 +455,7 @@ class Exif {
$val = substr( $this->mFilteredExifData[$prop], 8 );
switch ( $charCode ) {
case "\x4A\x49\x53\x00\x00\x00\x00\x00":
// JIS
case "JIS\x00\x00\x00\x00\x00":
$charset = "Shift-JIS";
break;
case "UNICODE\x00":

View file

@ -327,7 +327,6 @@ class CoreParserFunctions {
$username = trim( $username );
// default
$gender = User::getDefaultOption( 'gender' );
// allow prefix and normalize (e.g. "&#42;foo" -> "*foo" ).

View file

@ -373,7 +373,6 @@ class DefaultPreferencesFactory implements PreferencesFactory {
];
}
// Language
$languages = Language::fetchLanguageNames( null, 'mwfile' );
$languageCode = $this->config->get( 'LanguageCode' );
if ( !array_key_exists( $languageCode, $languages ) ) {

View file

@ -734,7 +734,6 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
}
$content['scripts'] = $scripts;
// Styles
$styles = [];
// Don't create empty stylesheets like [ '' => '' ] for modules
// that don't *have* any stylesheets (T40024).

View file

@ -105,7 +105,7 @@ class RevDelLogItem extends RevDelItem {
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
// Comment
$comment = CommentStore::getStore()->getComment( 'log_comment', $this->row )->text;
$comment = $this->list->getLanguage()->getDirMark()
. Linker::commentBlock( $comment );

View file

@ -40,7 +40,6 @@ class SpecialNewpages extends IncludableSpecialPage {
}
protected function setup( $par ) {
// Options
$opts = new FormOptions();
$this->opts = $opts; // bind
$opts->add( 'hideliu', false );
@ -63,13 +62,11 @@ class SpecialNewpages extends IncludableSpecialPage {
$opts->add( $key, $params['default'] );
}
// Set values
$opts->fetchValuesFromRequest( $this->getRequest() );
if ( $par ) {
$this->parseParams( $par );
}
// Validate
$opts->validateIntBounds( 'limit', 0, 5000 );
}

View file

@ -237,10 +237,8 @@ class SpecialTags extends SpecialPage {
// add raw $hitcount for sorting, because tags-hitcount contains numbers and letters
$newRow .= Xml::tags( 'td', [ 'data-sort-value' => $hitcount ], $hitcountLabel );
// actions
$actionLinks = [];
// delete
if ( $showDeleteActions && ChangeTags::canDeleteTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'delete' ),
@ -250,7 +248,6 @@ class SpecialTags extends SpecialPage {
}
if ( $showManageActions ) { // we've already checked that the user had the requisite userright
// activate
if ( ChangeTags::canActivateTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'activate' ),
@ -259,7 +256,6 @@ class SpecialTags extends SpecialPage {
[ 'tag' => $tag ] );
}
// deactivate
if ( ChangeTags::canDeactivateTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'deactivate' ),

View file

@ -473,7 +473,6 @@ class BotPassword implements IDBAccessObject {
return Status::newFatal( 'botpasswords-locked' );
}
// Throttle
$throttle = null;
if ( !empty( $wgPasswordAttemptThrottle ) ) {
$throttle = new MediaWiki\Auth\Throttler( $wgPasswordAttemptThrottle, [

View file

@ -254,7 +254,7 @@ class SyncFileBackend extends Maintenance {
'src' => $fsFile->getPath(), 'dst' => $dPath, 'overwrite' => 1 ];
} elseif ( $sExists === false ) { // does not exist in source
$ops[] = [ 'op' => 'delete', 'src' => $dPath, 'ignoreMissingSource' => 1 ];
} else { // error
} else {
$this->error( "Unable to sync '$dPath': could not stat file." );
$status->fatal( 'backend-fail-internal', $src->getName() );

View file

@ -643,7 +643,7 @@ return [
'group' => 'jquery.ui',
'targets' => [ 'desktop', 'mobile' ],
],
// Effects
'jquery.effects.core' => [
'deprecated' => true,
'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect.js',

View file

@ -55,7 +55,6 @@ class LinkRendererTest extends MediaWikiLangTestCase {
$linkRenderer->makeKnownLink( $target, null, [], [ 'foo' => 'bar' ] )
);
// forcearticlepath
$linkRenderer->setForceArticlePath( true );
$this->assertEquals(
'<a href="/wiki/Foobar?foo=bar" title="Foobar">Foobar</a>',