Showing 11,545 of 11,545 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( pi.deprecatedvalues && pi.deprecatedvalues.indexOf( v ) >= 0 ) {
optionWidget.$element.addClass( 'mw-apisandbox-deprecated-value' );
optionWidget.$label.before(
$( '<span>' ).addClass( 'mw-apisandbox-flag' ).text( mw.msg( 'api-help-param-deprecated-label' ) )
);
- 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 89.
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._helper && !o.animate && (/relative/).test(ce.css('position')))
$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
- 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 89.
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
mw.widgets.UsersMultiselectWidget.prototype.updateHiddenInput = function () {
if ( '$hiddenInput' in this ) {
this.$hiddenInput.val( this.getSelectedUsernames().join( '\n' ) );
// Trigger a 'change' event as if a user edited the text
// (it is not triggered when changing the value from JS code).
- 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 89.
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._helper && !o.animate && (/static/).test(ce.css('position')))
$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
- 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 89.
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 ( pi.internalvalues && pi.internalvalues.indexOf( v ) >= 0 ) {
optionWidget.$element.addClass( 'mw-apisandbox-internal-value' );
optionWidget.$label.before(
$( '<span>' ).addClass( 'mw-apisandbox-flag' ).text( mw.msg( 'api-help-param-internal-label' ) )
);
- 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 89.
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
File SqliteInstaller.php
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Sqlite-specific installer.
*
File LegacyLogger.php
has 279 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
Function setErrors
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
HtmlformChecker.prototype.setErrors = function ( valid, errors, forceReplacement ) {
let $oldErrorBox,
showFunc,
$text,
replace,
Function MwRcfiltersUiMenuSelectWidget
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MenuSelectWidget = function MwRcfiltersUiMenuSelectWidget( controller, model, config ) {
config = config || {};
this.controller = controller;
this.model = model;
Function _sfc_render$r
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
const _component_cdx_icon = resolveComponent("cdx-icon");
return !_ctx.isLegend ? (openBlock(), createElementBlock(
"div",
{
Function fn
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
fn(state) {
return __async(this, null, function* () {
const {
placement,
rects,
Function OoUiPopupWidget
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
// Configuration initialization
config = config || {};
// Parent constructor
Function OoUiTextInputWidget
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
OO.ui.TextInputWidget = function OoUiTextInputWidget( config ) {
// Configuration initialization
config = Object.assign( {
labelPosition: 'after'
}, config );
Function _open
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
_open: function( event, target, content ) {
var tooltip, events, delayedShow,
positionOption = $.extend( {}, this.options.position );
if ( !content ) {
Function _doKeyDown
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
_doKeyDown: function(event) {
var inst = $.datepicker._getInst(event.target);
var handled = true;
var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
inst._keyEvent = true;
Method makeLoad
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function makeLoad( Context $mainContext, array $modules, $only,
array $extraQuery = []
) {
$rl = $mainContext->getResourceLoader();
$chunks = [];
Method buildContent
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
final protected function buildContent( Context $context ) {
$statsFactory = MediaWikiServices::getInstance()->getStatsFactory();
$statStart = microtime( true );
// This MUST build both scripts and styles, regardless of whether $context->getOnly()
Method resyncFiles
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resyncFiles( array $paths, $resyncMode = true ) {
$status = $this->newStatus();
$fname = __METHOD__;
foreach ( $paths as $path ) {
Method getQueryInfo
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getQueryInfo( $schema = self::SCHEMA_BLOCK ) {
$commentQuery = $this->commentStore->getJoin( 'bl_reason' );
if ( $schema === self::SCHEMA_IPBLOCKS ) {
return [
'tables' => [
Method makeListItem
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function makeListItem(
string $key,
array $item,
array $options = [],
array $linkOptions = []