Showing 11,545 of 11,545 total issues
Method getSourceSection
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getSourceSection() {
if ( $this->mSessionKey ) {
return [
'SessionKey' => [
'type' => 'hidden',
Method getDefaults
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function getDefaults() {
$services = MediaWikiServices::getInstance();
$mainConfig = $services->getMainConfig();
$interwikiMagic = $mainConfig->get( MainConfigNames::InterwikiMagic );
$allowExternalImages = $mainConfig->get( MainConfigNames::AllowExternalImages );
Method load
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load( $flags = IDBAccessObject::READ_NORMAL ) {
global $wgFullyInitialised;
if ( $this->mLoadedItems === true ) {
return;
Method publishBatch
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function publishBatch( array $ntuples, $flags = 0 ) {
$this->assertWritableRepo(); // fail out if read-only
$backend = $this->backend; // convenience
// Try creating directories
Method getResponseBodySchema
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getResponseBodySchema() {
// TODO: we need to reference a re-usable "user" type. The license structure should also be re-usable.
return [
'description' => 'revision meta-data',
'required' => [
Method __construct
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct( LanguageFactory $languageFactory ) {
parent::__construct(
$languageFactory,
[
'А',
File mw.widgets.MediaSearchWidget.js
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* MediaWiki Widgets - MediaSearchWidget class.
*
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
File ClientHtml.php
has 286 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
File MWLBFactory.php
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Generator of database load balancing objects.
*
* This program is free software; you can redistribute it and/or modify
Identical blocks of code found in 2 locations. Consider refactoring. Open
$.extend(this.offset, {
click: { //Where the click happened, relative to the element
left: event.pageX - this.offset.left,
top: event.pageY - this.offset.top
},
- 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 92.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
$.extend(this.offset, {
click: { //Where the click happened, relative to the element
left: event.pageX - this.offset.left,
top: event.pageY - this.offset.top
},
- 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 92.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
ordinal: function (number, period) {
var output =
number === 1
? 'r'
: number === 2
- 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 92.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
ordinal: function (number, period) {
var output =
number === 1
? 'r'
: number === 2
- 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 92.
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 ( extDependencyMap[ name ].skins ) {
for ( i in extDependencyMap[ name ].skins ) {
skin = extDependencyMap[ name ].skins[ i ];
node = document.getElementById( 'config_skin-' + skin );
if ( !node || !node.checked ) {
- 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 92.
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 ( extDependencyMap[ name ].extensions ) {
for ( i in extDependencyMap[ name ].extensions ) {
ext = extDependencyMap[ name ].extensions[ i ];
node = document.getElementById( 'config_ext-' + ext );
if ( !node || !node.checked ) {
- 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 92.
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 explodeRowspans
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function explodeRowspans( $table ) {
let spanningRealCellIndex, colSpan,
rowspanCells = $table.find( '> tbody > tr > [rowspan]' ).get();
// Short circuit
Function ExpiryWidget
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
mw.widgets.ExpiryWidget = function ( config ) {
const RFC2822 = 'ddd, DD MMM YYYY HH:mm:ss [GMT]';
// Config initialization
config = Object.assign( {}, config );
Function getErrorMessageForStateDetails
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
mw.Upload.BookletLayout.prototype.getErrorMessageForStateDetails = function () {
let state = this.upload.getState(),
stateDetails = this.upload.getStateDetails(),
warnings = stateDetails.upload && stateDetails.upload.warnings,
$ul = $( '<ul>' ),
File mw.widgets.TableWidget.js
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @classdesc Groups {@link mw.widgets.RowWidget row widgets} together to form a bidimensional
* grid of text inputs.
*
* @class
Function diffCleanupSemantic
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {
var changes = false;
var equalities = []; // Stack of indices where equalities are found.
var equalitiesLength = 0; // Keeping our own length var is faster in JS.
/** @type {?string} */