Showing 11,545 of 11,545 total issues
Method doUpdates
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doUpdates() {
$this->assertTransition( 'done' );
// TODO: move logic into a PageEventEmitter service
Method getCurlHandle
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getCurlHandle( array &$req, array $opts ) {
$ch = curl_init();
curl_setopt( $ch, CURLOPT_PROXY, $req['proxy'] ?? $this->proxy );
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT_MS, intval( $opts['connTimeout'] * 1e3 ) );
Method getFinalParamDescription
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFinalParamDescription() {
$prefix = $this->getModulePrefix();
$name = $this->getModuleName();
$path = $this->getModulePath();
Method run
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function run( $resultPageSet = null ) {
$pages = $this->getPageSet()->getGoodPages();
if ( $pages === [] ) {
return; // nothing to do
}
Method showForm
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function showForm() {
$userAllowed = true;
// Messages: revdelete-selected-text, revdelete-selected-file, logdelete-selected
$out = $this->getOutput();
Method concatenateChunks
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function concatenateChunks() {
$oldFileKey = $this->mFileKey;
$chunkIndex = $this->getChunkIndex();
$this->logger->debug(
__METHOD__ . ' concatenate {totalChunks} chunks: {offset} inx: {curIndex}',
File mw.widgets.DateInputWidget.js
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* MediaWiki Widgets – DateInputWidget class.
*
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
File PostgresInstaller.php
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PostgreSQL-specific installer.
*
* This program is free software; you can redistribute it and/or modify
File ApiQueryBacklinksprop.php
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* API module to handle links table back-queries
*
* Copyright © 2014 Wikimedia Foundation and contributors
File MWExceptionHandler.php
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.prevAll( ".ui-menu-item" ).each(function() {
item = $( this );
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 121.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.nextAll( ".ui-menu-item" ).each(function() {
item = $( this );
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 121.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( that.orientation === "horizontal" ) {
if ( i === 0 ) {
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
}
if ( i === 1 ) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 121.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
} else {
if ( i === 0 ) {
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
}
if ( i === 1 ) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 121.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function MwWidgetsDatetimeDateTimeInputWidget
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
mw.widgets.datetime.DateTimeInputWidget = function MwWidgetsDatetimeDateTimeInputWidget( config ) {
// Configuration initialization
config = Object.assign( {
type: 'datetime',
clearable: true,
Function deflate_stored
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
const deflate_stored = (s, flush) => {
/* Smallest worthy block size when not flushing or finishing. By default
* this is 32K. This can be as small as 507 bytes for memLevel == 1. For
* large input and output buffers, the stored block size will be larger.
File GlobalIdGenerator.php
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
Method primaryPosWait
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function primaryPosWait( IDatabase $conn, DBPrimaryPos $pos, $timeout ) {
if ( !( $pos instanceof MySQLPrimaryPos ) ) {
throw new InvalidArgumentException( "Position not an instance of MySQLPrimaryPos" );
}
Method handleRollbackRequest
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleRollbackRequest() {
$this->enableTransactionalTimelimit();
$this->getOutput()->addModuleStyles( 'mediawiki.interface.helpers.styles' );
$request = $this->getRequest();
Method extractRevisionInfo
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function extractRevisionInfo( RevisionRecord $revision, $row ) {
$vals = [];
$anyHidden = false;
if ( $this->fld_ids ) {