Showing 11,545 of 11,545 total issues
File MessagesHe.php
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/** Hebrew (עברית)
*
* @file
* @ingroup Languages
Function _sfc_render$4
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
const _component_cdx_icon = resolveComponent("cdx-icon");
const _component_cdx_button = resolveComponent("cdx-button");
return openBlock(), createElementBlock(
"div",
Method imageLinks
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function imageLinks() {
$limit = 100;
$out = $this->getContext()->getOutput();
Method retrieveMetaData
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function retrieveMetaData() {
$config = MediaWikiServices::getInstance()->getMainConfig();
$djvuDump = $config->get( MainConfigNames::DjvuDump );
$djvuTxt = $config->get( MainConfigNames::DjvuTxt );
$djvuUseBoxedCommand = $config->get( MainConfigNames::DjvuUseBoxedCommand );
Method getAllowedParams
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAllowedParams() {
$slotRoles = $this->slotRoleRegistry->getKnownRoles();
sort( $slotRoles, SORT_STRING );
$smallLimit = $this->getMain()->canApiHighLimits() ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_SML1;
Method recentChangesBlockLine
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function recentChangesBlockLine( $rcObj ) {
$data = [];
$type = $rcObj->mAttribs['rc_type'];
$logType = $rcObj->mAttribs['rc_log_type'];
File MessagesCs.php
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/** Czech (čeština)
*
* @file
* @ingroup Languages
Function deepEqualCyclic
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deepEqualCyclic(obj1, obj2) {
// used for cyclic comparison
// contain already visited objects
var objects1 = [],
Function then
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,
Method getUserLinks
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getUserLinks(
SpecialPage $sp,
User $target
) {
$id = $target->getId();
Method run
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function run( $resultPageSet = null ) {
$params = $this->extractRequestParams();
$db = $this->getDB();
$query = $params['query'];
Method execute
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
// Get parameters
$params = $this->extractRequestParams();
$this->helpFormat = $params['helpformat'];
Method wt2html
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function wt2html(
PageConfig $pageConfig, array $attribs, ?string $wikitext = null
) {
$request = $this->getRequest();
$opts = $attribs['opts'];
Similar blocks of code found in 3 locations. Consider refactoring. Open
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11
? forms[0]
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
- 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 118.
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 3 locations. Consider refactoring. Open
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11
? forms[0]
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
- 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 118.
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 3 locations. Consider refactoring. Open
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11
? forms[0]
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
- 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 118.
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 MwRcfiltersUiItemMenuOptionWidget
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ItemMenuOptionWidget = function MwRcfiltersUiItemMenuOptionWidget(
controller, filtersViewModel, invertModel, itemModel, highlightPopup, config
) {
const $label = $( '<div>' )
.addClass( 'mw-rcfilters-ui-itemMenuOptionWidget-label' );
Function _create
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.originalTitle = this.element.attr( "title" );
// #5742 - .attr() might return a DOMElement
if ( typeof this.originalTitle !== "string" ) {
this.originalTitle = "";
Method getCharset
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getCharset( $tag ) {
// According to iim standard, charset is defined by the tag 1:90.
// in which there are iso 2022 escape sequences to specify the character set.
// the iim standard seems to encourage that all necessary escape sequences are
// in the 1:90 tag, but says it doesn't have to be.
Method performUpload
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function performUpload( $warnings ) {
// Use comment as initial page text by default
$this->mParams['text'] ??= $this->mParams['comment'];
/** @var LocalFile $file */